Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNS configuration lost on reboot.[SOLVED]
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
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Mon May 23, 2011 2:30 pm    Post subject: DNS configuration lost on reboot.[SOLVED] Reply with quote

I've been trying to find where I can set my dns service configuration so they remain on reboot.

Right now, eth0 (the only nic) is set to have a fixed IP.
Code:
config_eth0=( "192.168.27.4 netmask 255.255.255.0 brd 192.168.27.255" )
routes_eth0=( "default via 192.168.27.1" )
#config_eth0=( "dhcp" )
mtu_eth0="9000"
dns_domain_lo="dbz"


The content of /etc/resolv.conf gets overwriten on reboot and my name server disapears. Right now, I'm using a script in /etc/local.d to re-write it, but it's not exactly the optimal way of doing things.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.


Last edited by madchaz on Mon May 23, 2011 4:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon May 23, 2011 2:37 pm    Post subject: Reply with quote

Add this line to your /etc/conf.d/net (replace 1.1.1.1 and 2.2.2.2 with your DNS servers):

if using baselayout-2
Code:
dns_servers_eth0="1.1.1.1 2.2.2.2"


if using baselayout-1
Code:
dns_servers_eth0=( "1.1.1.1 2.2.2.2" )
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Mon May 23, 2011 4:45 pm    Post subject: Reply with quote

Thanks.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
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