Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to set up a DNS server on a Raspberry pi running Raspbian. I have been following tutorials online on how to setup a DNS server, and I found this one that was very easy to follow.

http://www.heystephenwood.com/2013/06/use-your-raspberry-pi-as-dns-cache-to.html

I followed the directions and installed dnsmasq via the link listed on this site

curl "https://raw.github.com/stephendotexe/raspberrypi/master/roles/dnsmasq_server" | sudo sh,

but when it attempted to start dnsmasq, it gave me the error;

dnsmasq: failed to create listening socket for port 53: Address already in use failed!

I did some research and I came across this post on the Askubuntu site.

http://askubuntu.com/questions/191226/dnsmasq-failed-to-create-listening-socket-for-port-53-address-already-in-use

Again, I followed the directions and it appeared that dnsmasq interferes with Network Manager, so I ran the following commands, as directed by the post.

sudo apt-get remove dnsmasq-base
sudo apt-get install dnsmasq
sudo apt-get install network-manager network-manager-gnome

Again, this didn't solve my problem. I tried to use lsof to figure out what is using port 53, so I installed it with sudo apt-get install lsof and ran the command;

sudo lsof -Pn +M | grep ':53 (LISTEN)

I got this output

COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
named   1955 bind   20u  IPv4   2467      0t0  TCP 127.0.0.1:53 (LISTEN)
named   1955 bind   21u  IPv4   2469      0t0  TCP 192.168.0.102:53 (LISTEN)
named   1955 bind  512u  IPv4   2466      0t0  UDP 127.0.0.1:53 
named   1955 bind  513u  IPv4   2468      0t0  UDP 192.168.0.102:53

I assume this means I need to uninstall BIND or at least make it not execute on startup.

share|improve this question
    
You need to run lsof as root: sudo lsof +M -nPi :53 –  Stéphane Chazelas Sep 21 '13 at 8:25
    
Ok. I think that BIND is taking up port 53, but I'm not sure if I'm interpreting the readout correctly. There are 5 processes running and under the USER column they all say bind. Does this mean that BIND is running and I need to uninstall it? COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME named 1955 bind 20u IPv4 2467 0t0 TCP 127.0.0.1:53 (LISTEN) named 1955 bind 21u IPv4 2469 0t0 TCP 192.168.0.102:53 (LISTEN) named 1955 bind 512u IPv4 2466 0t0 UDP 127.0.0.1:53 named 1955 bind 513u IPv4 2468 0t0 UDP 192.168.0.102:53 –  Snip3r Sep 21 '13 at 8:32
    
Also BIND is a DNS server, correct? –  Snip3r Sep 21 '13 at 8:33
    
Yes, bind/named is a DNS server. You could edit your question and include the output of that lsof command. –  Stéphane Chazelas Sep 21 '13 at 8:34
1  
I fixed it. I cannot answer my question for another 7 hours, however. –  Snip3r Sep 21 '13 at 8:48

1 Answer 1

in your DNSMASQ.conf, be sure TFTP is disabled for the concerned interface (eth8 in my case, replace by yours)

# = dont provide DHCP or TFTP on this interface : (BUT provide DNS service)
no-dhcp-interface=eth8
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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