0

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
Siggy
  • 31
  • 5

1 Answers1

0

Turns out it wasn't Bind or the DNS server acting up it was Windows. After I confirmed on multiple Linux servers no issue between resolving internal and external I removed my secondary DNS (remote server no local zones) and flushed the dns on a Windows system and it started resolving correctly.

Siggy
  • 31
  • 5
  • that's not really acting up...it used the dns servers you told it to. – Grant Apr 08 '14 at 21:16
  • It was Windows deciding to switch between primary and secondary DNS, for whatever reason Windows used the primary for the nslookups but everything else was using secondary. – Siggy Apr 15 '14 at 17:24
  • yep, windows doesn't always use the DNS servers in order. If you are listing two DNS servers, they should be ones that return the same results. Plenty of documentation on XP's behaviour in that regard, not sure about newer windows versions. http://serverfault.com/questions/52923/when-does-a-windows-client-stop-using-a-secondary-dns-server-and-revert-back-to – Grant Apr 15 '14 at 17:28