Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use a VPN client to access my company's intranet. It used to work fine with older versions of Ubuntu. But on 12.04 it doesn't. It is able to connect but I do not see any packet exchange happening, hence not able to browse the Intranet.

During some troubleshooting I found out that in 12.04 DNS resolution has been changed, and my VPN client is not able to update the DNS server. After a little Googling I found a post which proposed adding the DNS nameserver IP addresses to /etc/dhcp/dhclient.conf as follows.

prepend domain-name-servers <ip1>, <ip2>;   #this was the addition i made

request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers,
    dhcp6.domain-search, dhcp6.fqdn,
    dhcp6.name-servers, dhcp6.sntp-servers;

This resolves the issue and I can browse the intranet website. But this doesn't persist for a longer time. It appears the DNS gets changed after a while. Is there a way I can make DNS settings not to change, or every time it changes it should get those IP addresses also included ?

share|improve this question
    
Please say which VPN client you are using. –  jdthood May 26 '13 at 20:43
add comment

2 Answers

up vote 1 down vote accepted

In ubuntu 12.04, any changes made manually to /etc/resolv.conf will be overwritten later by a DNS information manager called resolvconf.

If you want to change the default settings, you could modify files base, head, or tail under /etc/resolvconf/resolv.conf.d.

  • base: Used when no other data can be found
  • head: Header of default resolv.conf. The server inside will the first ones to check.
  • tail: entries appended at the end of resolv.conf. In some cases, upgrading from a previous Ubuntu release, will make tail a symlink to original

Ref:

Auto DNS resolving in Ubuntu 12.04 desktop

share|improve this answer
add comment

Third-party VPN clients sometimes futz with /etc/resolv.conf and sometimes don't restore /etc/resolv.conf properly when they exit.

For background, see Launchpad bug #1000244 and, in particular, comment #121.

https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1000244/comments/121

To fix, try doing sudo dpkg-reconfigure resolvconf.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.