LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   My Linux laptop can no longer resolve DNS (https://www.linuxquestions.org/questions/linux-newbie-8/my-linux-laptop-can-no-longer-resolve-dns-901201/)

veeruk101 09-05-2011 05:36 AM

My Linux laptop can no longer resolve DNS
 
I moved my Linux laptop from my home network, where everything seemed to be working fine, to another wireless network. All of a sudden, it no longer seems to be able to resolve dns (at least Firefox/Thunderbird).

My Firefox/Thunderbird in my Windows virtual machine works fine, and in Linux all other Internet things seem to be working fine (such as Skype, and pinging google.com etc). I can even enter an IP address directly into Firefox and it will work, just typing an actual domain name such as www.google.com won't work and give the standard 'cannot find server at ....' error.

What could have gone wrong here? (Reinstalling Firefox/Thunderbird to latest versions, and starting them in safe mode changed nothing.)

The only thing I can think of is looking at 'route' command output, which shows:

Code:

Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
172.16.147.0    *              255.255.255.0  U    0      0        0 vmnet1
192.168.1.0    *              255.255.255.0  U    2      0        0 wlan0
172.16.104.0    *              255.255.255.0  U    0      0        0 vmnet8
default        192.168.1.254  0.0.0.0        UG    0      0        0 wlan0

Earlier I made a note to myself to run the following command, 'route add default gw 192.168.1.1', so I ran that command and ended up with 2 'default' entries in the output above. Still didn't get Firefox/Thunderbird to work. So removed 192.168.1.254 as a default entry, and still didn't work. So then removed all 'default' entries and still didn't work. I'm so confused. (I didn't run 'sudo service NetworkManager restart' between every change, wasn't sure if I needed to.)

Any other changes to dns settings I may need to make? Not sure why things would have just stopped working when I changed the wireless network to which my Linux laptop is connected. But everything else seems to be working fine, except for DNS resolution in Firefox/Thunderbird.

If you could please help, I'd really appreciate it!

tbrand 09-05-2011 05:55 AM

This is not a problem with your routing table. Most likely the DNS addresses in /etc/resolv.conf are incorrect or non-existent.

If you are using DHCP on the new network verify that the DHCP server is supplying the correct DNS addresses.

If you have a static address assigned on your new network find out what the correct DNS addresses are and update your /etc/resolv.conf manually.

repo 09-05-2011 06:00 AM

Since the problem is only in firefox, and you can ping google.com, DNS is working.
Can you browse using another browser?
Try to disable ipv6 in firefox.
http://thedaneshproject.com/posts/di...-in-firefox-3/

Kind regards

veeruk101 09-05-2011 06:28 AM

Thank you very much, marking thread as solved. People who stumble upon this thread can solve this problem by disabling ipv6 as described above in both Firefox and Thunderbird (must do it in both to get both working). Thanks again!


All times are GMT -5. The time now is 01:27 AM.