I'm running Scientific Linux 6.3 and just updated the machine to dnsmasq-2.48-13.el6.x86_64. The machine is on local ip I have a local caching DNS setup that was working until the update.

/etc/dnsmasq.conf configuration:


I confirmed that dnsmasq is running, the ports open and close as I start and stop dnsmasq.

$ netstat -nl # shows that the port was opened
Proto Recv-Q Send-Q Local Address           Foreign Address        State
tcp        0      0*              LISTEN
udp        0      0*

but trying to resolve fails

$ nslookup google.com
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

even trying to telnet fails

$ telnet 53
telnet: connect to address Connection refused

I don't seen anything in /var/log/messages related to dnsmasq. Stopping iptables didn't help. I'm not sure where to go from here.

  • I just realized, I can connect to dnsmasq on the machine remotely. But the local machine can't connect to itself using either or Both refuse connections. – dan Apr 2 '13 at 18:16
  • Should we take this to mean that you're only getting a "refused" when connecting to from the same machine but connecting to from a different machine does work? – Bratchley Apr 2 '13 at 18:54
  • That is correct. Connecting to port 53 on from a different machine on the network works fine. – dan Apr 2 '13 at 18:54
  • Have you checked the firewall to see if that's blocking it? – Bratchley Apr 2 '13 at 19:01
  • I turned iptables off. That was the only firewall running. That didn't help. – dan Apr 2 '13 at 19:07

Based on your additional info, you need to add this line to dnsmasq.conf, which my Slackware machine has in /etc/:


That's in addition to the other listen-address line. You can configure more than one "listen-address". My guess is that you also need to comment out the "bind-interfaces" line, too, but that's just a guess.

You should also check what the resolv-file parameter value is. Does that file exist, and do its contents make sense? You probably don't want something like:


because that would make all the calls to gethostbyname() either skip using dnsmasq, or dnsmasq will try to use itself to resolve names, depending on what's in /etc/resolv.conf.

Don't forget to restart dnsmasq after making changes.

  • That worked. bind-interfaces DID need to be commented out also... Thanks. – dan Apr 2 '13 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.