CentOS BIND DNS Not Responding To DNS Queries

KB ID 0000906 Dtd 21/01/14

Problem

While moving my DNS records from my old hosting company, I finally got round to pointing my domain name server records at my own server. I then saw my web traffic nose dive! Some troubleshooting steps later I realised I could not connect to my server on TCP port 53 (use my port scanner if you want to test yours).

Solution

Allow Access to DNS BIND From Remote Clients

1. Firstly let’s make sure that the firewall is not blocking DNS (Note: I’m using iptables).

iptables -A INPUT -p udp -m state –state NEW –dport 53 -j ACCEPT iptables -A INPUT -p tcp -m state –state NEW –dport 53 -j ACCEPT service iptables save service iptables restart

2. Still mine refused to work! I had to edit the named.conf file

nano /etc/named.conf

3. Mine was set to only respond to 127.0.0.1, and only return localhost.

Before

named.conf allow any host

After

named.conf allow dns access

4. Then restart the DNSBIND service.

service named restart

Related Articles, References, Credits, or External Links

NA

Author: Migrated

Share This Post On