Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

DNS-server for local domains



7:19 am on Jul 13, 2013 (gmt 0)

10+ Year Member

Hi friends,

I have two FreeBSD servers.
Server 1 is DNS.
Server 2 is Apache.

I have a public sub-domain as I have pointed to my public IP address (A record) and made NAT from ZyXEL NBG4615 router on port 53 and 80 to server 1
I have created a zone file on server 1, and when I do nslookup I get the local IP address of the server 2 return.
I've tried to do NAT on port 80 directly into the server 2 It works without problems.
And when I from a PC on the network, manually place the server 2 as DNS and do nslookup again so I can see the call server 1 and returns Server 2's IP address.

When I type sub-domain name I am sent to my public IP address. Then I hit server 1 And then it has to send me to the server 2 (because it is in the zone file). But it does not.
I turned off all firewall's from, but without success.

What remains for me to do, or what have I done wrong?


7:27 pm on Jul 13, 2013 (gmt 0)

WebmasterWorld Senior Member dstiles is a WebmasterWorld Top Contributor of All Time 5+ Year Member

Not really familiar with managing DNS servers but guesses:

Caching from previous access

hosts file on the querying computer has an entry for the subdomain

subdomain not in DNS list - a subdomain has to be separately specified for an IP (in my experience)

if the subdomain is listed in another (eg external/public) DNS server then routing becomes important - the public server may take precedence.

Warning: be very careful about potential access by baddies - some DNS setups are very easy to crack and poison or subvert. But you already knew that! :)


8:07 pm on Jul 13, 2013 (gmt 0)

5+ Year Member

I think it is your dns search order in /etc/host.cnf.

default it is: order hosts,bind
change it to: order bind, hosts

now the dns server will looked up first.

Featured Threads

Hot Threads This Week

Hot Threads This Month