Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old October 22nd, 2006   #1
handy
OSTalk.org 4um: All OS's Are Welcome
 
handy's Avatar
 
Join Date: Nov 2005
Location: Oz
Beans: 3,661
How-To Stabilise your DNS addresses

So if your problem is that your ISP's DNS addresses keep being lost after a reboot (sometimes it takes more than one reboot, sometimes it happens without a reboot!!)

A possible symptom of this problem is not being able to use Synaptic Package Manager.

What follows may solve your problem.

Also, in this howto is a quick IPv6 fix for Firefox users, followed by a simple method that enables globally disabling IPv6 (added 22-Oct-07), which some may find they need to do to speed up their internet experience. There is also basic instructions for using keyboard combinations for cutting, pasting & moving text in & out of the Terminal & elsewhere, intended for those unfamiliar with the Terminal.

All sections are easy to find when scrolling.

If you are new to the Terminal, scroll down the page to the Text & the Terminal section.

I have tested the following on Ubuntu's Dapper, Edgy, Feisty & Gusty, but not on the previous Breezy version of Ubuntu?

For Breezy see Post 2. of this thread for Python's wonderful solution, it does not work in Dapper & beyond, unfortunately.

The Case of the Disappearing DNS's

After a great deal of trying work-arounds, even being driven to invent one myself, someone called Mips, finally pointed me to the solution.

The following solution, pertaining to the dissapearing DNS's, is courtesy of Stream303 I've just made it easier for new users to follow.

____________________

This is the way to prepend the resolv.conf file with your known good ISP's Domain Name Servers (DNS).

Editing the /etc/dhcp3/dhclient.conf

(If you are unfamiliar with using the Terminal have a look down this page for the Text & the Terminal section.)

Enter the following line in the Terminal:

sudo gedit /etc/dhcp3/dhclient.conf

and just before the request line in your dhclient.conf file that you are looking at in gedit, add the following line, or remove the comment # from the start of the line if it is allready exists):

prepend domain-name-servers 208.67.222.222, 208.67.220.220;

You will probably want to swap your ISP's DNS addresses for the ones in the above example.

( You may also choose to leave them, as they are the legitimate OpenDNS IP's, & will work IF you edit your router's firmware via your browser & replace your ISP's DNS addresses with the OpenDNS ones. There are very simple & straight forward instructions for this on the OpenDNS website. If you don't know your ISP's DNS addresses, the OpenDNS how-to will show you how to get it from 95% of routers. If you still can't access your router you will have to google for the information.

You can also allways check your ISP's web site or phone them if you don't have access to the addresses in documentation that your ISP supplied.

I have been using OpenDNS for some time & am very pleased with the faster browsing speed, highly recommended.
)

For multiple addresses, separate with a comma and don't forget the semicolon at the end.

This will have the effect of prepending your ISP's nameservers and of having your routers DNS address automaticaly come up at the bottom of the list in resolv.conf.

Reboot or just bring your interface down and up again by entering the following in the Terminal:

sudo /etc/init.d/networking restart

Finished!

____________________


IPv6 Quick (Firefox) Fix

If you can't access the web through Firefox, though you know you have an internet connection via your modem/router, OR you find it very slow to move between servers, after which browsing that server is as fast as it should be? Try the following:

Enter about:config in Firefox's address field.

Enter ipv6 in the new Filter: field.

Double click on the line left in the display window to change it's boolean value to true.

Restart Firefox.

& that should be that...

____________________


Disable IPv6 Globally

Unlike the method of editing /etc/modprobe.d/aliases, the following method does not run the risk of being overwritten.

Do the following to disable IPv6 globally:

1. To verify that the IPv6 module is loaded type the following from a terminal:

handy@birdfish:~$ lsmod | grep ipv6
ipv6 265856 10

2. Then from a terminal type:

handy@birdfish:~$ sudo echo "blacklist ipv6" > /etc/modprobe.d/blacklist-ipv6

3. Restart

4. To verify that the IPv6 module is not loaded type the following from a terminal:

handy@birdfish:~$ lsmod | grep ipv6
handy@birdfish:~$


If for whatever reason the above method does not work, type either of the following alternatives a. or b. in the terminal:

a. echo "blacklist ipv6" | sudo tee -a /etc/modprobe.d/blacklist

b. sudo nano -w /etc/modprobe.d/blacklist & enter the line blacklist-ipv6

after both a. or b. do steps 3. & 4. as above.

____________________

The reason for the first (DNS) problem which strikes lots of modem/routers is due to their windows centric design.

The reason for the second (IPv6) problem is due to the cheap quality of the router, which is also responsible for the first problem...

[Edit:] After having used other Linux distro's & PC-BSD, I have had to modify my conclusions as I have only experienced the above three problems when using *buntu, last verified on both (k)ubuntu 7.10.


____________________


Text & the Terminal

I know how it feels, having come from the windoze point & click for allmost everything environment, how intimidating it can feel, having to type arcane commands into the Terminal!

We can get used to the Terminal surprisingly quickly.

So often when we have found the help in the forums, wiki or other online reference we can just highlight with the mouse a command string & copy it into the Terminal on our own machine hit enter & move on... This method avoids typo's too!

Very often, using commands in the Terminal is quicker by far than using a mouse.

What follows are the few basic keyboard commands that make it all so easy.

These keyboard shortcuts are not only useful for the
Terminal they can be used for any other field that accepts text, the use of these keyboard shortcuts is only limited by your imagination. I use them all the time when writing in the forums. (All the 2 fingered ones are valid in windoze & DOS too!)

If you highlight text by left mouse button dragging over the desired text you can use keyboard combo's to manipulate it.

The most used 2 finger Key Combo's follow:

Copy = < ctrl > + < c >

Paste = < ctrl > + < v >

Cut = < ctrl > + < x > Followed by the Paste combo' is Move.

When manipulating text with Key Combo's, in the Terminal, (which is extremely useful) you are required to use the same combinations as above, with the addition of the < shift > key, making Terminal combo's 3 fingered.

The Terminal is your friend...

You will find both the Terminal & Text Editor in the Menu: Applications / Accessories

The Text Editor (gedit is it's name if you call it from the Terminal) is both simple & powerful.

For anyone wanting an online reference to the Terminal & beyond the 2 following links should keep you going for a long time:

http://www.ubuntuforums.org/showthre...minal+tutorial

http://tldp.org/guides.html
__________________
Illusionary moments: Humanities' creation; mercurial, dynamic, limited by reflection.
Growing minds, drawn to truths - in past & ever present.
Oh! Indelible cost. Onerous weight.
Born by the vain belief in truth.

Last edited by handy; December 3rd, 2009 at 10:32 PM.. Reason: Added disabling IPv6 Globally
handy is offline   Reply With Quote
Old October 24th, 2006   #2
mssever
I Ubuntu, Therefore, I Am
 
mssever's Avatar
 
Join Date: Jun 2006
Location: 대전, Korea
Beans: 3,447
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to mssever Send a message via Yahoo to mssever Send a message via Skype™ to mssever
Re: How-To Stabilise your DNS addresses

Thanks. I'm subscribing to this thread so I can find it easily when I want to point people to it.
__________________
What's a blub programmer?         Registered Linux user #419974
My projects:
Net Responsibility -- Internet accountability software for Linux
BadgeEntry -- Track attendance for children's events
mssever is offline   Reply With Quote
Old October 25th, 2006   #3
handy
OSTalk.org 4um: All OS's Are Welcome
 
handy's Avatar
 
Join Date: Nov 2005
Location: Oz
Beans: 3,661
Re: How-To Stabilise your DNS addresses

Quote:
Originally Posted by mssever View Post
Thanks. I'm subscribing to this thread so I can find it easily when I want to point people to it.
Thanks for your positive feedback I thought I could take up less space on the forum's drives by putting a few oft needed solution in the same place.
__________________
Illusionary moments: Humanities' creation; mercurial, dynamic, limited by reflection.
Growing minds, drawn to truths - in past & ever present.
Oh! Indelible cost. Onerous weight.
Born by the vain belief in truth.

Last edited by handy; October 26th, 2006 at 09:43 PM..
handy is offline   Reply With Quote
Old November 1st, 2006   #4
torakiki
First Cup of Ubuntu
 
torakiki's Avatar
 
Join Date: Oct 2006
Location: Holland
Beans: 8
Ubuntu 9.10 Karmic Koala
Re: How-To Stabilise your DNS addresses

I've a NETGEAR DG834G and this worked perfectly. Thanks
torakiki is offline   Reply With Quote
Old November 7th, 2006   #5
bayvista
Gee! These Aren't Roasted!
 
Join Date: Nov 2005
Location: Sydney, Australia
Beans: 167
Ubuntu 9.10 Karmic Koala
Re: How-To Stabilise your DNS addresses

I've tried this by plugging my DNS server address into dhclient.conf, but I still can't get Synaptic to work.

I have a D-Link DI524 Router connected to a D-Link DSL502T ADSL Modem using DHCP.

I can access the web via Firefox. I can even get to the Ubuntu repositories via Firefox, but not via Synaptic.


Any help appreciated.

David
bayvista is offline   Reply With Quote
Old November 8th, 2006   #6
bayvista
Gee! These Aren't Roasted!
 
Join Date: Nov 2005
Location: Sydney, Australia
Beans: 167
Ubuntu 9.10 Karmic Koala
Re: How-To Stabilise your DNS addresses

Thanks, Handy

I chose the second option - OpenDNS. Plugged in the addresses and all is working now. Much faster, too.

I don't think that the router quality is an issue. I don't consider $85 cheap considering what it does. No, it is just that Windows manage their networks better than Linux, which still has a long way to go to catch up. Nevertheless, I am dedicated to replacing my Windows with Linux eventually. 6 months work so far and still going!

David
bayvista is offline   Reply With Quote
Old November 8th, 2006   #7
dmizer
自己犠牲の精神
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,889
Xubuntu 8.04 Hardy Heron
Re: How-To Stabilise your DNS addresses

Quote:
Originally Posted by bayvista View Post
I don't think that the router quality is an issue. I don't consider $85 cheap considering what it does. No, it is just that Windows manage their networks better than Linux, which still has a long way to go to catch up.
that's laughable. $85 is retail level equipment (read: cheap). when you're talking about the level of equipment able to handle ipv6 correctly and with no issues, this: http://www.icpsales.com/cisco3800.html is the level of equipment and price range you're looking at.

sure, windows xp is suppose to be able to handle it (after a patch), but windows 2000 can't. and linux has been able to handle ipv6 almost (if not as long) as ipv6 has been around. remember, linux is a server first and a desktop second. there's a reason most giants rely on linux for their servers (google for one), and i can assure you, it's not because linux's networking ability is behind windows.

Last edited by dmizer; November 8th, 2006 at 10:20 PM..
dmizer is offline   Reply With Quote
Old November 11th, 2006   #8
bayvista
Gee! These Aren't Roasted!
 
Join Date: Nov 2005
Location: Sydney, Australia
Beans: 167
Ubuntu 9.10 Karmic Koala
Re: How-To Stabilise your DNS addresses

I thought it was too good....

Well, my Internet access is fine from all 3 PCs BUT...
I have lost the connection to my LAN??

Windows says:"Network Name cannot be found." in My Network Places when I try to access my Workgroup

Ubuntu says: "User/Password" when I try and access Windows Network, Anything I enter is rejected.

Any ideas?

David
bayvista is offline   Reply With Quote
Old November 11th, 2006   #9
Mishal
A Carafe of Ubuntu
 
Mishal's Avatar
 
Join Date: Jan 2006
Beans: 143
Xubuntu 8.10 Intrepid Ibex
Re: How-To Stabilise your DNS addresses

I am having problems browsing and for that matter doing anything else on the net EXCEPT that I have access to ubuntu servers using Synaptic.

I am guessing its a problem with my DNS but I don't know where to change the DNS in my router settings.


I don't even know what my ISP's DNS is. Please help
Mishal is offline   Reply With Quote
Old November 11th, 2006   #10
berserker
Gee! These Aren't Roasted!
 
berserker's Avatar
 
Join Date: Jun 2005
Beans: 175
Re: How-To Stabilise your DNS addresses

Quote:
Originally Posted by bayvista View Post
I thought it was too good....

Well, my Internet access is fine from all 3 PCs BUT...
I have lost the connection to my LAN??

Windows says:"Network Name cannot be found." in My Network Places when I try to access my Workgroup

Ubuntu says: "User/Password" when I try and access Windows Network, Anything I enter is rejected.

Any ideas?

David
The same thing happens to me when I use the Opendns servers. I read a post yesterday that mentioned Opendns has received several reports from Ubuntu users who lose access to their internal network when using their servers. Nobody seems to have figured out a solution yet.
berserker is offline   Reply With Quote

Bookmarks

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

Forum Jump


All times are GMT -4. The time now is 06:20 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry