How do I make my Network settings sticky?

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

How do I make my Network settings sticky?

Post by Husse » Fri Mar 02, 2007 10:43 am

For some reason Firefox and Thunderbird connects to the internet (as now) without me adjusting any network settings. The IP for DNS in Network Manager is that of my router and thus they are able to handle DNS forwarding. Synaptics and "apt-get" needs to have an address to a DNS server set under Network settings. But when you set a DNS address the only way to save it is as a location. So far so well, but I can't get the location to be sticky i.e. be the default configuration.
It's so "not default" that doing some sudo can make it drop the settings....
More settings somewhere, perhaps?
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

sharke
Level 1
Level 1
Posts: 14
Joined: Sat Mar 10, 2007 9:32 am

Post by sharke » Sun Mar 11, 2007 4:27 am

I had the same problem and to solve i logged into the router and set the dns manually to the dns given by my ip and then used that dns .
regards
sharke

Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Post by Husse » Sun Mar 11, 2007 9:48 am

Unfortunately I can not do that in my router, if so the problem would have been solved long time ago.
However I found another solution. I quote from the so far unavailable wiki article I've writtem:
You may find that you can set an address to a DNS server in network.config in "Networking" in the controlcenter. This setting is not sticky and disappears from time to time. This is because the /etc/resolv.conf is reset to the IP of your router (something like 192.168.1.1) at every DHCP lease (and reboot).

Step 1) gksudo gedit /etc/resolv.conf add the IP to your ISP if you know them or to OpenDNS (208.67.222.222 and 208.67.220.220). Like "nameserver 208.67.222.222" add one line per server, a maximum of 3 servers. There should already be one IP there, use it as a pattern. Without step 2 this is useless.

Step 2) gksudo gedit /etc/dhcp3/dhclient.conf

add a line "prepend domain-name-servers 208.67.222.222,208.67.220.220;" (no quotes) The DNS servers here must be the same as in /etc/resolv.conf. The prepend stops the servers being ditched in etc/resolv.conf
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

Post Reply

Return to “Ethernet”