Select DNS Servers depending on the domain


 
Thread Tools Search this Thread
Special Forums IP Networking Select DNS Servers depending on the domain
# 1  
Old 05-08-2009
Select DNS Servers depending on the domain

Hello,

I'm using CentOS 5.3, and I connect to a VPN in order to work. The problem is that I'm constantly accessing things on the local network and the remote network. But once I'm connected to the VPN I can't access local addresses by name, I have to use the ip-address.

What I'd like is to configure things so that all of the things that are on my domain use my local DNS, and the rest of the stuff use the VPN DNS.

Is this possible? Regards
# 2  
Old 05-08-2009
It is a long time since I did this but you need to point your CentOS machine at your local DNS servers ensure your CentOS machine know what domain it belongs to (both in /etc/resolv.conf) and then get your DNS server to use the VPN DNS when it gets DNS requests for domains that it does not know about. I trust someone else will tell us how to do the latter.
# 3  
Old 05-13-2009
while you are VPN connected ; can you try to resolve anything using you local DNS ? ; can you even ping your local DNS ?
i have a feeling that your VPN connection should not filter out any communication with local IP network ? if so then test this criteria by trying to do a DNS query while VPN connected
some thing like
#nslookup
then set the server to your local server
>server my.dns.ip.address
then try to resolve any local DNS name

if the request times out this means that your resolver [DNS client] could not communicate with your DNS server ! ; if not then this means that you will need to add the local DNS to the list of valid DNS servers that is used while you are VPN connected [this is related with the configuration acquisition that is made upon VPN connection ]

regards

Last edited by shico1973; 05-13-2009 at 04:34 PM.. Reason: correction
# 4  
Old 05-15-2009
Hello,

When I'm VPN connected and I try to access anything inside the local network, it gets resolved to an error page from Yahoo.

I did the nslookup:
Code:
$ nslookup
> server my.dns.server
> local-computer-name

And it worked. So this should be a matter of setting the dns server on the resolv.conf file, which looks like this when I'm not vpn connected:
Code:
nameserver 172.x.x.x

And like this when I'm connected:
Code:
;;SNX;; - {
nameserver 10.x.x.x
nameserver 10.x.x.x
search corp.mycompany.com
;;SNX;; - }
; generated by /sbin/dhclient-script
nameserver 172.x.x.x

If I move my local nameserver up, everything gets resolved using my dns, and the other way around. That's why I was kind of asking if it's posible to decide wich one to use depending on the thing you want to access.


thanks and regards
# 5  
Old 05-15-2009
You need to get you local DNS servers to pass on queries for domains that are not yours to a higher tier DNS server (e.g. the DNS server responsible for .com).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux is not appending domain name in DNS query

In my /etc/resolv.conf file there is domain name defined. But when I do nslookup the domain name is not appended. Why? (18 Replies)
Discussion started by: broy32000
18 Replies

2. UNIX for Advanced & Expert Users

Changing hosting company for one domain, how to deal with DNS?

Hello, Our organization is planning to move one domain from Dreamhost to Hubspot. Lets say, it is gem.xyxyxyxyx.com. Please note, website is not being migrated from one server to another, it is just hosting company. Here is from our internal DNS master server - # cat... (6 Replies)
Discussion started by: solaris_1977
6 Replies

3. Linux

Domain registrars & DNS servers

I have read many tutorials on bind and i understand the A,MX, CNAME records. Internally, on a LAN we can install bind and create all these records and we can tell all PC and servers to use this bind as DNS server.that's fine. On the Internet, when we have purchased a valid domain like... (5 Replies)
Discussion started by: coolatt
5 Replies

4. Shell Programming and Scripting

Command to flush specific domain in SunOS 5 DNS

Hello to all, May you help saying me how to flush a specific domain in Linux SunOS5 I know the command rndc is to flush DNS cache, but I would like to know: 1- How to do a flush only on specific domain 2- How to see the content of DNS Resolver cache (similar to info given by IPCONFIG... (2 Replies)
Discussion started by: Ophiuchus
2 Replies

5. UNIX and Linux Applications

Stop samba from querying trusted domain servers

Hi, We've got a samba server running in our DMZ. Our users drag & drop files on it for vendors. Everything was working perfectly until the powers that be decided to build a trust between a couple of internal domains. Samba is now querying each server in the trust. When a user browses... (5 Replies)
Discussion started by: mph
5 Replies

6. Linux

Configuring dns in local domain

Hi everybody, for revolving local host name of my network, I set up an dns server to solve my problem, but til now, nothing happen when I ping a hostname, but work on IP. Can you help me to correct the configuration. Here is all my settings: Voici mes fichiers de configuration: -... (2 Replies)
Discussion started by: beloge2002
2 Replies

7. Shell Programming and Scripting

Select and display sum depending upon even columns

Select and display sum depending upon even columns i have a input as : 2898 | homy | pune | 7/4/09 1 :6298 | anna | chennai | 7/4/08 2 :3728 | gonna | kol | 8/2/10 3 :3987 | hogja | mumbai | 8/5/09 4 :6187 | galma | london | 9/5/01 5 :9167 | tamina | ny | 8/3/10 6 :3981 | dastan | bagh |... (1 Reply)
Discussion started by: adityamitra
1 Replies

8. UNIX for Dummies Questions & Answers

Select and display sum depending upon even columns

i have a input as : 2898 | homy | pune | 7/4/09 1 :6298 | anna | chennai | 7/4/08 2 :3728 | gonna | kol | 8/2/10 3 :3987 | hogja | mumbai | 8/5/09 4 :6187 | galma | london | 9/5/01 5 :9167 | tamina | ny | 8/3/10 6 :3981 | dastan | bagh | 8/2/07 7 :4617 | vazir | ny now,i want to get... (2 Replies)
Discussion started by: adityamitra
2 Replies

9. Solaris

change dns (domain name)

hi gurus, need to check other than the hosts file, what else i need to change after we have changed the domain name in our company. currently, we are using olddnsname.com and will change it to newdnsname.com. i am not sure where else in solaris i need to take a look. please advise. thank... (4 Replies)
Discussion started by: kim_custodio
4 Replies
Login or Register to Ask a Question