2

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.

quack quixote
  • 42,186
  • 14
  • 105
  • 129
AJ.
  • 3,991
  • 8
  • 29
  • 34

3 Answers3

3

Did you install resolvconf ?

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

Studer
  • 3,766
  • 19
  • 26
  • @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
0

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.

pcapademic
  • 3,711
  • 3
  • 31
  • 30
  • @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
0

@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