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
  • 43,504
AJ.
  • 4,069

3 Answers3

3

Did you install resolvconf ?

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

Studer
  • 3,816
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,821
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