Solved

How to use different DNS servers for different domains

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SonarQube on Linux vs Windows 3 28
ftp to port 21 4 43
DNS issue with resolving request 14 87
linux SFTP 8 44
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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

810 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