1827671 Members
3419 Online
109967 Solutions
New Discussion

DNS Problem

 
SOLVED
Go to solution
Admin32
Advisor

DNS Problem

Hi everyone,

I've got a neat problem here on our network and I'm trying to figure out a way around it.

I have a server which runs BIND 9.2.1.9. The server is acting as a master dns for e.g internal.com.

At the same time, our network is connected to 1)the Internet 2) a client via VPN.

The servers resolv.conf file has the following entries:
search internal.com cust-vpn.com
nameserver 192.168.0.1 (the dns server itself)
nameserver 10.0.0.1 (VPN customer DNS server)
nameserver 203.10.10.1 (isp dns server).

The problem:
Our customer has a varierty of servers e.g server1, server2, server3, server4 and we need to be able to resolve their ip via simple queries (e.g ping server1). To add another twist to the problem, the customers internal domain exists also as a valid domain on the internet. e.g yahoo.com. This means that via the vpn, server1's gqdn is server1.yahoo.com.

My resov.conf has our own dns server as a first choice, so, when i type ping server1, this will result the request being send to the Internet, when infact I need it to go through the vpn and contact our customers internal dns server to resove server1's ip address.

So, I decided to change the nameserver entries around:
nameserver 10.0.0.1 (customers dns via our vpn)
nameserver 192.168.0.1 (our dns server)
namerserver 203.10.10.1 (isp dns server).

Ping server1, now works and resoves using our customers dns server! The problem is that every other query will go through the vpn ! Something we do not want.

So here I am trying to find a way, to make the server only send the DNS requests to our customer's DNS server via the VPN when this is required.

The "nameserver" entries in the resolv.conf will only work in its original configuration IF our own DNS server is offline, inwhich case it will then try to contact the customers DNS server and resolve the host ip. But then you get the problem where all dns requests are send through the VPN !

I do not want to add manual entries for the serverX hosts, which is why Im looking into the problem deeper and hope to find a solution !

Any input is appreciated !!

Thank you, and sorry for the long message !
1 REPLY 1
Kodjo Agbenu
Honored Contributor
Solution

Re: DNS Problem

Hello,

If I were you, I would try one of the 2 following solutions :

=> either configure your DNS server to forward all requests to your customer :

zone "cust-vpn.com" in
{
type forward;
forward first;
forwarders
{
customer_vpn_DNS1;
customer_vpn_DNS2;
...
};
};


=> Or configure your DNS server to be a secondary server of your customer :

zone "cust-vpn.com" in
{
type slave;
master customer_primary_DNS;
file "db.cust-vpn.com";
allow-updates
{
customer_primary_DNS;
};
};


zone "reverse-cust-vpn-IP.in-addr.arpa" in
{
type slave;
master customer_primary_DNS;
file "db.cust-vpn.IP";
allow-updates
{
customer_primary_DNS;
};
};


Good luck.

Kodjo

Learn and explain...