Hide name-server version in CentOS servers
With dedicated and VPS servers it’s important that you try and keep the server as secure as possible. You should always deploy a firewall like CSF at the bare minimum. It is also a good idea to change the ssh port and to hide your name server version.
If your using Bind then we have provided an easy way to hide your name server version. This will help by not allowing people to know what version you’re using. In turn, they won’t be able to exploit any known issues which have not been patched.
Edit named.conf
Log in as root, first, we’re going to make a copy of the /etc/named.conf file in case anything goes wrong. If you make a mistake you can simply move this file to the required location to revert the changes. Copy the code below. Deploy nano if required. Copy the file to /root then open the named.conf file to start editing.
yum install nano -y
cp /etc/named.conf /root
nano /etc/named.conf
You should now be presented with the configuration file you need to edit to hide your name server version. Be careful in this file. Make sure you place the code required in the correct place exactly how this post says. If you make a mistake here all sites on your server will lose connectivity. You will need to use the backup file located in the /root folder to replace the damaged file. If you have made a mistake and you need to restore the file just issue the below command
cp /root/named.conf /etc/
Hide Name Server Version
Now let’s find the correct section. In the console press the “page down” key on your keyboard. Look for a line that says “allow-transfer {“none”;};” underneath this line place the following code. This is the code that will hide your name-server version;
version none;
The file should now look like this with version none; at the bottom. Make sure you include the ;
Restart Named
Now you need to restart named. Do this by issuing the below command
service named restart
Now named has restarted you can proceed to a site list freedns.report to produce a DNS report on a domain name that’s located on your VPS server or dedicated server and the report should say your name server version is hidden.
How was this article? – Hide name-server version in CentOS servers
You might also like
More from Dedicated Servers
Enable Mod_RemoteIP – See Visitors Real IP address when using Cloudflare & Apache
If you are using Cloudflare on your Apache server you will always see Cloudflare IPs in your logs and not …
Fix 413 Request Entity Too Large Errors When Using NGINX
Just like Apache, NGINX imposes default limits on the size of files that can be uploaded. A 413 Request Entity …
Cloud-init Modules That Automate and Customize Deployments
Cloud-init is a popular way to automate deployments of instances in a cloud or none cloud environment. To save having …