You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.4 KiB
47 lines
1.4 KiB
13 years ago
|
From: Thomas Bettler <bettlert@...>
|
||
|
Subject: Troubles with dns
|
||
|
Newsgroups: gmane.network.vpnc.devel
|
||
|
Date: 2005-01-08 15:25:28 GMT (15 weeks, 3 days, 6 hours and 18 minutes ago)
|
||
|
As we discussed on back in november, dns servers assigned from vpn connection
|
||
|
are not handled, instead resolv uses the old dns entries.
|
||
|
|
||
|
This should be corrected.
|
||
|
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2004-November/000296.html
|
||
|
and
|
||
|
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2004-November/000298.html
|
||
|
|
||
|
I propose to add the two patches to make it work with or
|
||
|
without /sbin/resolvconf (which isn't part of all linux systems)
|
||
|
|
||
|
patch for vpnc-connect
|
||
|
+if [ -x /sbin/resolvconf ] ; then
|
||
|
+ for i in $INTERNAL_IP4_DNS; do
|
||
|
+ echo $i >> /etc/resolv.conf.vpnc
|
||
|
+ done
|
||
|
+ if [ "$DIRECTION" = "up" ] ; then
|
||
|
+ cat /etc/resolv.conf.vpnc | /sbin/resolvconf -a "$IFACE"
|
||
|
+ else
|
||
|
+ /sbin/resolvconf -d "$IFACE"
|
||
|
+ fi
|
||
|
+else
|
||
|
+# in case we have no /sbin/resolvconf handle /etc/resolv.conf manually
|
||
|
+ mv /etc/resolv.conf /var/run/vpnc/resolv.conf
|
||
|
+ for i in $INTERNAL_IP4_DNS; do
|
||
|
+ echo nameserver $i >> /etc/resolv.conf
|
||
|
+ done
|
||
|
+fi
|
||
|
|
||
|
patch for vpnc-disconnect
|
||
|
+if [ -x /sbin/resolvconf ] ; then
|
||
|
+##### remark
|
||
|
+##### I don't know /sbin/resolvconf and don't know exactly how to revert.
|
||
|
+##### This line might not work... please test
|
||
|
+ /sbin/resolvconf -d "$IFACE"
|
||
|
+else
|
||
|
+ mv /var/run/vpnc/resolv.conf /etc/resolv.conf
|
||
|
+fi
|
||
|
|
||
|
Lots of greatings
|
||
|
Thomas Bettler
|
||
|
|