Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNS per connection
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
ssteinberg
Apprentice
Apprentice


Joined: 09 Jul 2010
Posts: 206
Location: Israel

PostPosted: Fri Feb 04, 2011 3:52 pm    Post subject: DNS per connection Reply with quote

How do I setup my connections so if I happen to connect through mutiple interfaces (eth/wireless/3g modem) I get an /etc/resolv.conf per connection.
What I want to resolve is losing DNS if WiFi gets disconnect while on 3G, or vice-versa.
Thank you
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Fri Feb 04, 2011 6:40 pm    Post subject: Reply with quote

Hi,

I don't know how to get a resolv.conf per connection (ethernet, wifi, 3G, etc), but If you want to continue using proper DNS server per connection, I should advise you to use net-dns/openresolv.
With this application, you can force using one or multiple DNS server, while using your interface's DNS. I'm not sure if I explains it well, but you can see openresolv's website for more informations.

My /etc/resolvconf.conf :
Code:
 Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=127.0.0.1

# set resolv.conf options statement
#resolv_conf_options=""


My generated /etc/resolv.conf :
Code:
# Generated by resolvconf
nameserver 127.0.0.1
nameserver 10.10.10.10


The first one is because I want to use my local DNS server, and the 10.10.10.10 is to access to some services that from my VPN. So, 127.0.0.1 is static (always here) and the other name servers and automatically added by openresolv as I'm connecting to different networks. With this setup, I can always resolve domains :]

Hope this help.
_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
ssteinberg
Apprentice
Apprentice


Joined: 09 Jul 2010
Posts: 206
Location: Israel

PostPosted: Fri Feb 04, 2011 8:36 pm    Post subject: Reply with quote

Ah great, that is what I need. Never had to deal with different network interfaces, and now suddenly I have 2 laptops...
Thanks!
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