homepage Welcome to WebmasterWorld Guest from 54.166.65.9
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
DNS-server for local domains
jacobp




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

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?

 

dstiles




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

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! :)

bhukkel




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved