Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a working DHCP server on CentOS, with /etc/dhcp/dhcpd.conf set up as follows:

subnet netmask {
    option routers;
    option subnet-mask;

    option domain-name "nunce.home"
    option domain-name-servers; #This is the DHCP and DNS server IP

    option time-offset 1;

    authorative; #Makes server primary
    default-lease-time 7200; #2h
    max-lease-time 14400; #4h
    range 192.168.x.x 192.168.x.x;

Clients connecting to network receive the IP in the given range. The only thing which isn't working is the DNS setup. I have a BIND DNS server which is accessible from the server itself and is resolving custom DNS entries. The Ubuntu Client I'm using for testing purposes is not showing the correct NS in its /etc/resolv.conf . If I try


I don't get any response. Do you have any clue on what could be going wrong? If you need any other config file let me know.

share|improve this question
What do you get on the client when you do dig @ – MadHatter Jan 5 '14 at 22:25
I get a timeout, but it is still working if tetsted on the server. I can ping the server though and the listen-on section is commented out in the /etc/named.conf file. – Mateusz Kapusta Jan 5 '14 at 22:34
So thanks to MadHatters suggestion i found out it was the iptables firewall that blocked the connections. By turning it off service iptables stop And trying to resolve from my client dig @ I started to get responses. All I had to do was to add a rule, an exeption on port 53 for interface eth0: iptables -I INPUT -p tcp --dport 53 -j ACCEPT and iptables -I INPUT -p udp --dport 53 -j ACCEPT And started to get replies from my server. The problem is that if I don't use dig @ command the client doesn't query the correct DNS server. – Mateusz Kapusta Jan 5 '14 at 23:23

Your Answer


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

Browse other questions tagged or ask your own question.