So, on my network is a DNS server with an external zone (public IPs for servers) and internal zone (LAN IPs for servers). When I perform an nslookup on a server in the zone it resolves the local IP which is exactly what I want. But if I use ping or tracrt, and if I use putty to go to the server (www.blahblah.com instead of IP) they all use the public IP. Any ideas why the dns will resolve the local IPs in an nslookup but when trying to do anything else its finding the public IPs.
For external the view is:
view "external"{
match-clients { any; };
recursion no;
for internal its:
view "internal"{
match-clients { x.x.x.x/24; };
recursion yes;
x.x.x.x is not the actual value its using the right IP mask. The zones are within the {} set for each view.
internal view and zones are in named.conf.internal
external view and zones are in named.conf.external
they are includes in the named.conf.
named.conf:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.internal";
include "/etc/bind/named.conf.external";
Note: This is on Windows systems only, the linux servers appear to resolve fine.
example (x.x.x.x = local IP b.b.b.b = public):
C:\Users\[user]>nslookup www.[website].com
Server: UnKnown
Address: [dns server ip]
Name: www.[website].com
Address: x.x.x.x
C:\Users\[user]>ping www.[website].com
Pinging www.[website].com [b.b.b.b] with 32 bytes of data:
Reply from b.b.b.b: bytes=32 time=2ms TTL=64
Reply from b.b.b.b: bytes=32 time=3ms TTL=64
Reply from b.b.b.b: bytes=32 time=3ms TTL=64
Reply from b.b.b.b: bytes=32 time=3ms TTL=64
Ping statistics for b.b.b.b:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 3ms, Average = 2ms