If you want to disable detection of OS version during Nmap scans
1. Edit the sysctl.conf file
2. Add the following entry at the end of the file
net.ipv4.ip_default_ttl = 199
save and exist.
3. Run the following command to reload the sysctl configuration
4. You can now check the result by running an online nmap test here