summaryrefslogtreecommitdiffstats
path: root/doc/vpnc_connect_script_dns_patch_fix.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/vpnc_connect_script_dns_patch_fix.txt')
-rw-r--r--doc/vpnc_connect_script_dns_patch_fix.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/vpnc_connect_script_dns_patch_fix.txt b/doc/vpnc_connect_script_dns_patch_fix.txt
new file mode 100644
index 0000000..717e28f
--- /dev/null
+++ b/doc/vpnc_connect_script_dns_patch_fix.txt
@@ -0,0 +1,46 @@
+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
+