Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to specify a DNS for a specific domaine ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Fri Mar 28, 2014 10:34 pm    Post subject: How to specify a DNS for a specific domaine ? Reply with quote

pre question: in resolv.conf, what's the difference between the fields DOMAINE and SEARCH ? What I know is that on the latter, I can put several domains.

In resolv.conf, how do i specify a specific DNS IP for a specific domaine name ?

Use case: I have 3 VPN to 3 different private networks, each of them having their own local domaine name, and own local DNS. No way to take any of those DNS as primary NAMESERVER server as it would not solve the 2 other ones. So I want a classic resolver for public use, and, then, specify one IP per local domain ...
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Mar 28, 2014 10:40 pm    Post subject: Reply with quote

man resolv.conf

That should answer your questions.

Note: Not trying to not answer your question, but the man page tells you everything you can do with resolv.conf
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Fri Mar 28, 2014 10:47 pm    Post subject: Reply with quote

A friends of mine told me to look at nsswitch ... but no clue how it works.

From man resolv.conf, it can't be done; but maybe I did not read properly ?
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Fri Mar 28, 2014 10:50 pm    Post subject: Reply with quote

I mean ... I accept to conf things in /etc, but I refuse to install a resolver service like bind for this purpose.

It's so easy to do it at IP level, it's the definition of a routing table; I Can't believe it's so difficult at DNS level, and would require to install bind.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
ribx
Apprentice
Apprentice


Joined: 20 Nov 2003
Posts: 219
Location: germany

PostPosted: Thu Aug 21, 2014 2:49 pm    Post subject: Reply with quote

I am looking for a similar solution. A friend of mine uses OSX and has this feature (no clue if it ships with the os or not).

If you want to install a local DNS Server, check dnsmasq. Much easier to configure than bind.
_________________
The adopt an unanswered post initiative
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Aug 21, 2014 3:18 pm    Post subject: Reply with quote

I use dnsmasq for this function - it's pretty easy to do and the documentation is quite good.

The "search" line is for when you want to flesh out a short hostname into a fqdn. It will tack each domain onto the shortname and attempt to find that FQDN, until one passes or all such attempts fail.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum