Solved

How to use different DNS servers for different domains

Posted on 2009-05-05
5
469 Views
Last Modified: 2013-11-15
I have a postfix/spamassassin email server running in a DMZ.  I am trying to have it query 2 different DNS servers depending on what domain suffix they are trying to resolve.  I found a way to do it in the Mac world but not linux.  The server is Ubutu 7.10.

Here is the link on how to do it in the Mac world.  Can something like this be done in the Linux world?

http://www.macosxhints.com/article.php?story=2004062902195410
0
Comment
Question by:timkrampe1
5 Comments
 
LVL 5

Expert Comment

by:0ren
ID: 24310978
in linux you should edit /etc/resolv.conf and enter inside:

search domain.com
nameserver 12.14.151.1
nameserver 12.14.151.2
nameserver 12.14.151.3

0
 
LVL 5

Expert Comment

by:0ren
ID: 24310988
on search you can all the domains you need

search domain1.com domain2.com
0
 
LVL 20

Accepted Solution

by:
thehagman earned 500 total points
ID: 24312710
Actually the answer by Oren instructs the system to look for foo.domain1.com and foo.domain2.com if foo cannot be found.
The OP seems to want to check with server1 when looking for foo.domain1.com and server2 when looking for foo.domain2.com
I don't see how to configure that at the resolver; rather this may have to be configured at an internal name server ...
0
 
LVL 7

Expert Comment

by:diepes
ID: 24322707
have a look at dnsmasq - a dns server.

you point your resolver to it 127.0.0.1, and you can configure dnsmasq to do what you want.
0
 
LVL 1

Author Comment

by:timkrampe1
ID: 24329216
I will give these suggestions a try and get back to you.  Thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now