blob: 717e28fa262f0affb01f091e46dad4ca83ef7c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
|