Solved

How to use different DNS servers for different domains

Posted on 2009-05-05
5
477 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most often confused topics in the area DNS is the idea of GLUE records. Specifically, what they are, when they are needed, when they are provided, and how they are created. First, WHAT IS GLUE? To understand GLUE, you must first under…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

861 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