PDA

View Full Version : [ubuntu] problems with DNS and VPN



andrei.kouznetsov
April 23rd, 2008, 10:59 PM
Hi.

I'm using Ubuntu Gutsy and I'm having some problem when I'm working with VPN.
Here is the description of the problem
1. I establish wireless connection. My resolv.conf becomes


search temp.wsu.edu
nameserver 172.16.0.6

and I can't browse internet and do anything. It is normal, because I'm required to use VPN.
2. I make a VPN connection. my resolve.conf changes to


# generated by NetworkManager, do not edit!



nameserver 134.121.139.10
nameserver 134.121.80.36

And I'm able to access internet.

But after some time my resolv.conf changes to the one form the first step. And I can't browse sites (DNS stops working).

However I can do ping by IP, and if I manualy change the file to


nameserver 4.2.2.1

I can work for some time, until it changes back.

Windows users do not experience any problems of this kind. Any ideas?

superprash2003
April 24th, 2008, 02:12 AM
you can make ubuntu use certain DNS servers always by editing the dhclient.conf file http://prash-babu.blogspot.com/2008/04/how-to-configure-dns-servers-in-linux.html .. just replace 208.67.222.222 and 208.67.220.220 with your DNS ip

andrei.kouznetsov
April 25th, 2008, 06:47 PM
you can make ubuntu use certain DNS servers always by editing the dhclient.conf file http://prash-babu.blogspot.com/2008/04/how-to-configure-dns-servers-in-linux.html .. just replace 208.67.222.222 and 208.67.220.220 with your DNS ip

Thank you for your reply. It works perfect! And I'm using it right now.

However, it looks like this solution is not the way it should be :)
I mean, it looks like more a way around the problem, than the solution of the problem.

If any one knows the reason why it happens, you are welcome :)

superprash2003
April 26th, 2008, 02:37 AM
it changes back to the first DNS because you are connected to your router.. and your resolv.conf file is controlled by your router when you are using DHCP.. so the DNS servers of your router will pop in there