1

I have 1 local webserver "192.168.91.100" and 1 local DNS server "192.168.91.101" to do name resolve for the local web server.

I have configured few zones in local DNS server.

I wanted to link this 2 servers for domain name resolve instead of using /etc/hosts in local web server.

Problem:

I configured my local web server's /etc/network/interfaces - DNS-NAMESERVERS to 192.168.91.101 as DNS server once i do this internet connection in local web server will not be available.

Local Web Server - /etc/network/interfaces

auto eth0
iface eth0 inet static
address     192.168.91.100
netmask     255.255.255.0
gateway     192.168.91.2
# dns-nameservers   192.168.91.101  // When pointing to below DNS server internet connection will not work
# dns-nameservers     127.0.0.1     // If pointing to local DNS server internet connection will work

DNS Server - /etc/network/interfaces

auto eth0
iface eth0 inet static
address     192.168.91.101
netmask     255.255.255.0
gateway     192.168.91.2
dns-nameservers     127.0.0.1
3

You would need to add the appropriate forwarders to your BIND server config to resolve anything it cannot (ie: internet addresses). Either use the DNS servers your ISP provides or some other public DNS server.

Usually done through the named.conf file on BIND

forwarders {
            x.x.x.x;
            y.y.y.y;
    };
  • This DNS Server is for local setup only and all zones defined in it are private networks, so i dont think we require public DNS server for this – sravis Sep 11 '14 at 8:28
  • You're complaining that if you point the web server to the DNS server the "internet connection in local web server will not be available". If you want it available, you will need to resolve internet DNS queries. – Rex Sep 11 '14 at 8:30
  • Alternatively, since you seem to running a DNS server on your web server too, set up your private zones as as secondary on the web servers DNS and leave the config on the web server to point to 127.0.0.1 or setup the local DNS server forwarders to point to the web server DNS. – Rex Sep 11 '14 at 8:32

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.