Home » Questions » Computers [ Ask a new question ]

vpnc Not Adding Internal DNS Servers to resolv.conf

vpnc Not Adding Internal DNS Servers to resolv.conf

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:

Asked by: Guest | Views: 234
Total answers/comments: 2
Guest [Entry]

"Did you install resolvconf ?

If you did, try removing it and see if it works."
Guest [Entry]

"@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"