1

I am using dnsmasq on a CentOS box on an external network. My config file looks as follows:

port=53
bind-interfaces
user=root
group=dnsmasq
pid-file=/var/run/dnsmasq.pid
domain-needed
bogus-priv
no-hosts
dns-forward-max=150 
cache-size=1000
neg-ttl=3600
resolv-file=/etc/resolv.dnsmasq
no-poll
log-facility=/var/log/dnsmasq.log
log-queries

When I set my computer's DNS IP to my VPS, no website resolves. I can see in the log file

1 Answer 1

0

Centos by default has the iptables firewall installed and running. The default configuration is quite restrictive. I suspect that you haven't made provision within your firewall configuration to allow access on port 53. To check

sudo /sbin/iptables -L | grep domain 

if you get an output like this

ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain

then port 53 is open and your problem lies elsewhere.

If you get a blank output then you will need to add rules to open port 53.

sudo /sbin/iptables -I RH-Firewall-1-INPUT -p udp -m udp --dport 53 -j ACCEPT
sudo /sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 53 -j ACCEPT

Then save the configuration

sudo /sbin/service iptables save

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .