1829729 Members
1726 Online
109992 Solutions
New Discussion

Re: DNS question

 
Jano_1
Advisor

DNS question

Hi.

I have a DNS server resolving my domain to valid IP addresses so I can receive mail etc.
eg. mydomain.com -> 100.10.20.30

Is it possible to use the same server to resolve my domain also to invalid local addresses?
eg. mydomain.com -> 192.168.30.30

So when I ping from outside the network it will resolve
myserver.mydomain.com to 100.10.20.30
but from inside the network it will resolve
myserver.mydomain.com to 192.168.30.30

Regards.
Jano
2 REPLIES 2
Lee Hundley
Valued Contributor

Re: DNS question

Yes, this is possible. You will need to use Bind v9, and maintain 2 separate zone files for the inside and outside.Additionally, you will need a way to distinguish which clients have access to which zone file via an IP range.To utilize this, you will need to configure bind to use DNS "Views". An example of implementing DNS views can be found here:
http://www.zytrax.com/books/dns/ch7/view.html

If Bind9 isn't an option, you could always run 2 seperate instances of bind by using the 'listen-on' directive, coupled with seperate zone files as well. This is also assuming you have 2 IP addresses on the DNS server.
It is my firm belief that it is a mistake to hold any firm beliefs
Steven E. Protter
Exalted Contributor

Re: DNS question

You set up a seperate DNS database for local machines. I call mine local.dns and I put it in the /etc/named.conf file.

Then I point local machines to the inside DNS server and they get the local resolution for the internal server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com