Networking Forums

Networking Forums > Computer Networking > Linux Networking > resolv.conf for certains domains

Reply
Thread Tools Display Modes

resolv.conf for certains domains

 
 
tonia
Guest
Posts: n/a

 
      09-19-2006, 09:35 AM
Hi,

Im wondering if its possible to tell resolv.conf (or any other if it
exist) that for certain domain use one DNS server, and for all the
others (like a default gateway in a network environment) use other DNS
server.
Its that possible?.

Tnx!

 
Reply With Quote
 
 
 
 
Jack Snodgrass
Guest
Posts: n/a

 
      09-19-2006, 12:34 PM
On Tue, 19 Sep 2006 02:35:02 -0700, tonia wrote:

> Hi,
>
> Im wondering if its possible to tell resolv.conf (or any other if it
> exist) that for certain domain use one DNS server, and for all the
> others (like a default gateway in a network environment) use other DNS
> server.
> Its that possible?.
>
> Tnx!



nope.

you can use pdnsd to act as a local DNS server.
Point your boxes to your pdnsd server and configure
it so that it uses differne DNSes for different
domains.

--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      09-19-2006, 07:56 PM
On 19 Sep 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, tonia wrote:

>Im wondering if its possible to tell resolv.conf (or any other if it
>exist) that for certain domain use one DNS server, and for all the
>others (like a default gateway in a network environment) use other DNS
>server.


Using DNS, no. DNS works under the concept that the name server you ask
knows all (or can ask the right remote servers). The resolver code believes
the first answer it receives - even if that answer is "I don't know".

The usual cause of this problem is a local (more correctly, a "non-public")
domain, such as "tonia_s.casa". If you ask the Internet name servers from
your ISP, no one has heard of that domain - the answer is NXDOMAIN - and
your application is told "unknown host".

The usual solutions are to use the functions of /etc/nsswitch.conf
(/etc/host.conf for old applications) to cause the resolver to look in the
/etc/hosts file first. For larger domains, the Sun Yellow Pages (NIS) may
substitute for the hosts file.

Another solution is to run a forwarding name server on the local domain.
It answers DNS queries for "tonia_s.casa", and forwards _other_ queries
to the ISP name servers. Or, the name server may recursively resolve the
external addresses using a root hints file. See the DNS-HOWTO.

Old guy
 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      09-19-2006, 08:36 PM
On Tue, 19 Sep 2006 14:56:39 -0500, (E-Mail Removed) (Moe Trin) wrote:

>Another solution is to run a forwarding name server on the local domain.
>It answers DNS queries for "tonia_s.casa", and forwards _other_ queries
>to the ISP name servers. Or, the name server may recursively resolve the
>external addresses using a root hints file. See the DNS-HOWTO.


I use dnsmasq, it does local lookups first, then forwards remaining DNS
queries, it avoids the recursive lookups that running a full name server
involves.

Plus, dnsmasq provides DHCP services for a small network, couple years
in operation -- I like it.

Grant.
--
http://bugsplatter.mine.nu/
 
Reply With Quote
 
Joe Pfeiffer
Guest
Posts: n/a

 
      09-19-2006, 09:11 PM
Grant <(E-Mail Removed)> writes:

> On Tue, 19 Sep 2006 14:56:39 -0500, (E-Mail Removed) (Moe Trin) wrote:
>
> >Another solution is to run a forwarding name server on the local domain.
> >It answers DNS queries for "tonia_s.casa", and forwards _other_ queries
> >to the ISP name servers. Or, the name server may recursively resolve the
> >external addresses using a root hints file. See the DNS-HOWTO.

>
> I use dnsmasq, it does local lookups first, then forwards remaining DNS
> queries, it avoids the recursive lookups that running a full name server
> involves.


Also, it can be configured to do exactly what was asked for -- it can
forward queries to different DNS servers depending on domain. I use
it set up so that queries to the top-level domain ".vpn" go to a
machine that's running a DNS server and openvpn server (so I can get
to my vpn by machine name, not IP address), and all else goes to
whatever dns server the network I'm currently on wants it to go to.
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
 
Reply With Quote
 
tonia
Guest
Posts: n/a

 
      09-20-2006, 06:43 AM
great!
gonna try that.

Thanks all for the responses!


Joe Pfeiffer wrote:
> Grant <(E-Mail Removed)> writes:
>
> > On Tue, 19 Sep 2006 14:56:39 -0500, (E-Mail Removed) (Moe Trin) wrote:
> >
> > >Another solution is to run a forwarding name server on the local domain.
> > >It answers DNS queries for "tonia_s.casa", and forwards _other_ queries
> > >to the ISP name servers. Or, the name server may recursively resolve the
> > >external addresses using a root hints file. See the DNS-HOWTO.

> >
> > I use dnsmasq, it does local lookups first, then forwards remaining DNS
> > queries, it avoids the recursive lookups that running a full name server
> > involves.

>
> Also, it can be configured to do exactly what was asked for -- it can
> forward queries to different DNS servers depending on domain. I use
> it set up so that queries to the top-level domain ".vpn" go to a
> machine that's running a DNS server and openvpn server (so I can get
> to my vpn by machine name, not IP address), and all else goes to
> whatever dns server the network I'm currently on wants it to go to.
> --
> Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
> Department of Computer Science FAX -- (505) 646-1002
> New Mexico State University http://www.cs.nmsu.edu/~pfeiffer


 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      09-20-2006, 08:38 PM
tonia <(E-Mail Removed)> wrote:
> Im wondering if its possible to tell resolv.conf (or any other if it
> exist) that for certain domain use one DNS server, and for all the
> others (like a default gateway in a network environment) use other DNS
> server.


If you use DHCP then it should already do that - I had to tweak my laptop
to /stop/ it changing resolv.conf.

If you don't use DHCP then you need to think about how you tell your PC
which domain it's in, but you could probably automate the resolv.conf
change with a script in ifup.d (or equivalent).

Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
why are there 2 resolv.conf files? Rick Linux Networking 9 07-02-2004 05:06 PM
resolv.conf question Geoff Wheeler Linux Networking 1 02-24-2004 09:10 PM
resolv.conf Stephen Speicher Linux Networking 5 12-10-2003 09:00 AM
NIS, DNS and resolv.conf ncrfgs Linux Networking 2 10-02-2003 05:09 PM



1 2 3 4 5 6 7 8 9 10 11