Results 1 to 2 of 2
Thread: Bind9 DNS Question
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Sep 2007
Bind9 DNS Question
example.com has public DNS entries like as server1.example.com, server2.example.com, server3.example.com, etc configured on that domain.
From inside my network, I want to be able to resolve server1.example.com to an IP that I specify, I also want to be able to add in my own domains, like voip.example.com to an IP (which isn't set on the public website) on my network. If an entry doesn't exist, like say server2.example.com on my DNS server, then it will resolve the IP address normally (Using what ever DNS server my DNS server uses).
So far, I have it working, but I must specify every domain. It is only resolving hostnames that I've specified for this domain. It doesn't resolve server2.example.com for example, unless I tell it how. I can't even ping example.com unless I specify the IP.
Basically: If Bind9 has entry for domain then give IP or else, use the name server specified (or the server's DNS server) to resolve the IP.
$ORIGIN example.com. ; designates the start of this zone file in the namespace $TTL 1h ; default expiration time of all resource records without their own TTL value ; ; BIND data file for example.com ; @ IN SOA ns.nsforexample.com. example.com. ( 2012112726 ; Serial 7200 ; Refresh 120 ; Retry 2419200 ; Expire 604800) ; Default TTL ; @ IN NS ns.nsforexample.com. @ IN NS ns2.nsforexample.com. server1 IN A 192.168.1.10 voip IN A 192.168.1.20
What you want to do is pretty common, you have a private DNS server that serves your own domains but is only visible on your LAN. All your on-LAN computers are then configured to use your internal DNS server (usually by DHCP, but you can do it statically).
In your internal DNS server's DNS configuration add 'forwarder' lines to the named.conf. This will tell it which DNS servers to look at for domains it doesn't control.
There's a bit of an explanation about how its done here: https://support.citrix.com/article/CTX124727Linux user #126863 - see http://linuxcounter.net/