Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to setup vpnc on Ubuntu. When I run vpnc, my resolv.conf file does not get changed. It still only contains my ISP's name servers:

#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
nameserver 65.32.5.111
nameserver 65.32.5.112

Here is my /etc/network/interfaces:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.1.3
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 65.32.5.111 65.32.5.112

Any tips on how to troubleshoot/resolve this?

Thanks in advance.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted
+100

Did you install resolvconf ?

If you did, try removing it and see if it works.

share|improve this answer
    
@Studer - bingo, that fixed it. I wonder why apt-get install vpnc requires resolvconf, but you can just uninstall resolvconf? Odd... –  AJ. Feb 12 '10 at 22:00
    
I just wanted to say thanks.. saved my life. –  José Leal Apr 27 '12 at 14:17
add comment

I don't remember this being a problem. On the Editting [vpn name] dialog box, IPv4 Settings tab, my Method is set to Automatic (VPN), rather then "Automatic (VPN) addresses only", and name resolution to the internal network worked fine.

share|improve this answer
    
@EricJLN - "dialog box"...I'm just using the vpnc command in a terminal. I'm guessing there's a config file setting that maps to what you're referencing in your answer? –  AJ. Feb 11 '10 at 22:04
add comment

@AJ. the answer could come too late, but the question is always valid: to force a DNS configuration in a VPN managed by Network Manager, other than use GUI tools, you could open the file:

   /etc/NetworkManager/system-connections/<NetworkManager_VPN_name>

and, in section:

   [ipv4]

add:

   dns=10.31.57.70

Another method is to configure dnsmasq directly:

in the file:

   /etc/dnsmasq.conf

add (for example) a line:

   server=/10.in-addr-arpa/<VPN_DNS_IP_ADDRESS>

to forward all DNS requests for all hosts in network 10. to the DNS specified

then, of course, restart dnsmasq:

   $ sudo service dnsmasq restart
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.