Solved

How to use different DNS servers for different domains

Posted on 2009-05-05
5
484 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

695 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