VPN within VPN, resolv.conf nameserver order
Posted: Fri Mar 01, 2013 11:11 am
Hi,
I have an openvpn client that tunnels to a openvpn server within a vpnc tunnel connecting to a cisco vpn device. Connection through both vpn tunnels works and I have network connectivity, but my dns is not working correctly.
Before I connect to the first tunnel my resolv.conf has an entry for my local dns server, eg -
192.168.1.xxx
After connecting to my first vpn tunnel, cisco on tun0, my resolv.conf has the following entries:
domain blah.org
172.xxx.xxx.xxx
172.xxx.xxx.xxx
192.168.1.xxx
When I connect to the second tunnel, openvpn on tun1, my resolv.conf has the following entries:
domain blah.org
172.xxx.xxx.xxx
172.xxx.xxx.xxx
192.168.2.xxx
192.168.1.xxx
Name resolution for hosts reachable on tun1 fail unless I us the IP of the host that I am trying to connect to, meaning routing is working. If I manually edit the resolv.conf file and put the 192.168.2.xxx entry above the 172.xxx.xxx.xxx entries name resolution for tun1 hosts works. How can I set the resolv.conf updates from the openvpn server, on tun1, to automatically prepend the resolv.conf updates from the tun0 connection?
Note: the client os is debian squeeze using openresolv.
Any help would be greatly appreciated!
I have an openvpn client that tunnels to a openvpn server within a vpnc tunnel connecting to a cisco vpn device. Connection through both vpn tunnels works and I have network connectivity, but my dns is not working correctly.
Before I connect to the first tunnel my resolv.conf has an entry for my local dns server, eg -
192.168.1.xxx
After connecting to my first vpn tunnel, cisco on tun0, my resolv.conf has the following entries:
domain blah.org
172.xxx.xxx.xxx
172.xxx.xxx.xxx
192.168.1.xxx
When I connect to the second tunnel, openvpn on tun1, my resolv.conf has the following entries:
domain blah.org
172.xxx.xxx.xxx
172.xxx.xxx.xxx
192.168.2.xxx
192.168.1.xxx
Name resolution for hosts reachable on tun1 fail unless I us the IP of the host that I am trying to connect to, meaning routing is working. If I manually edit the resolv.conf file and put the 192.168.2.xxx entry above the 172.xxx.xxx.xxx entries name resolution for tun1 hosts works. How can I set the resolv.conf updates from the openvpn server, on tun1, to automatically prepend the resolv.conf updates from the tun0 connection?
Note: the client os is debian squeeze using openresolv.
Any help would be greatly appreciated!