
paulf at free
Nov 28, 2007, 1:02 PM
Post #4 of 7
(934 views)
Permalink
|
Hi Thabks for the reply. Joerg Mayer wrote: > On Mon, Nov 26, 2007 at 11:09:49PM +0100, Paul Floyd wrote: > >>The most glaring thing is that these are bash scripts (maybe ksh as >>well, I didn't test) but they claim via #!/bin/sh to be Bourne shells. > > > So which bash'isms are used? I'm not sure. I simply changed #!/bin/sh to #!/bin/bash >>ifconfig: setifflags: SIOCSLIFFLAGS: tun0: no such interface > > > Well, without the tun interface exverything else will break. tun is OK, I get as far as seeing the welcome message from the IPSec gateway. >>/etc/resolv.conf didn't look good: >>#@VPNC_GENERATED@ -- this file is generated by vpnc >># and will be overwritten by vpnc >># as long as the above mark is intact >>domain OLD NEW > > >>Hmm, two domains, not one? > > > Will need to have a look at the script - I don't think that I have that > problem at my system. Can you please add "set -x" near the top of the > script and have a look at the output (or mail it)? I made the following diff: The output below came with this diff: 238c237 < LINE="domain $CISCO_DEF_DOMAIN" --- > LINE="$LINE $CISCO_DEF_DOMAIN" Otherwise it seems to just append $CISCO_DEF_DOMAIN to the existing domain line in /etc/resolv.conf, hence the two domains. The other error message seems to come from route delete default ifconfig -a shows, (in addition to rtls0) tun0: flags=10010008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4,FIXEDMTU> mtu 1412 index 4 inet AAA --> AAA netmask ffffffff netstat -rn shows Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ---------- --------- default AAA UG 1 0 CCC 192.168.0.254 UGH 1 1 AAA AAA UH 1 0 tun0 192.168.0.0 192.168.0.1 U 1 3 rtls0 I think that CCC corresponds to the IPSec gateway that I'm connecting to. One more little thing. If I connect with the Cisco VPN client, it seems to set an mtu of 1356 rather than 1412. Not sure if that means anything. Here is the -x output of vpnc-script: Enter password for user[at]site: + PATH=/sbin:/usr/sbin:/usr/ccs/bin:/usr/xpg4/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/dt/bin:/export/home/paulf/qt-x11-free-3.3.8/bin:/opt/sfw/bin:/usr/sfw/bin:/bin:/usr/sbin:/usr/lang:/export/home/paulf/bin:/opt/SUNWspro/bin:/usr/ucb:/opt/schily/bin:/opt/tcl/bin:/export/home/paulf/p4 ++ uname -s + OS=SunOS + VPNC_WIN_SCRIPT=/etc/vpnc/vpnc-script-win + case "$OS" in + DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute + RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup + FULL_SCRIPTNAME=/usr/local/sbin/vpnc ++ basename /usr/local/sbin/vpnc + SCRIPTNAME=vpnc + '[' -d /var/run/vpnc ']' + mkdir -p /var/run/vpnc ++ which ip ++ grep '^/' + IPROUTE= + '[' SunOS = Linux ']' + ifconfig_syntax_ptp= + route_syntax_gw= + route_syntax_del=delete + route_syntax_netmask=-netmask + '[' -x /sbin/resolvconf ']' + '[' -x /sbin/modify_resolvconf ']' + MODIFYRESOLVCONF=modify_resolvconf_generic + RESTORERESOLVCONF=restore_resolvconf_generic + '[' -n '' ']' + '[' -z pre-init ']' + case "$reason" in + do_pre_init + '[' SunOS = Linux ']' + '[' SunOS = FreeBSD ']' + '[' SunOS = GNU/kFreeBSD ']' + '[' SunOS = NetBSD ']' + '[' SunOS = OpenBSD ']' + '[' SunOS = SunOS ']' + : + exit 0 + PATH=/sbin:/usr/sbin:/usr/ccs/bin:/usr/xpg4/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/dt/bin:/export/home/paulf/qt-x11-free-3.3.8/bin:/opt/sfw/bin:/usr/sfw/bin:/bin:/usr/sbin:/usr/lang:/export/home/paulf/bin:/opt/SUNWspro/bin:/usr/ucb:/opt/schily/bin:/opt/tcl/bin:/export/home/paulf/p4 ++ uname -s + OS=SunOS + VPNC_WIN_SCRIPT=/etc/vpnc/vpnc-script-win + case "$OS" in + DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute + RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup + FULL_SCRIPTNAME=/usr/local/sbin/vpnc ++ basename /usr/local/sbin/vpnc + SCRIPTNAME=vpnc + '[' -d /var/run/vpnc ']' ++ which ip ++ grep '^/' + IPROUTE= + '[' SunOS = Linux ']' + ifconfig_syntax_ptp= + route_syntax_gw= + route_syntax_del=delete + route_syntax_netmask=-netmask + '[' -x /sbin/resolvconf ']' + '[' -x /sbin/modify_resolvconf ']' + MODIFYRESOLVCONF=modify_resolvconf_generic + RESTORERESOLVCONF=restore_resolvconf_generic + '[' -n '' ']' + '[' -z connect ']' + case "$reason" in + do_connect + '[' -n 'welcome message' ']' + echo 'Connect Banner:' Connect Banner: + echo 'welcome message' + read LINE + echo '|' 'welcome message + read LINE + echo '|' $'\r' | + read LINE + echo '|' 'welcome message ' | wlcome message + read LINE + echo '|' $'\r' | + read LINE + echo '|' 'welcome message' | welcome message + read LINE + echo + do_ifconfig + ifconfig tun0 inet AAA AAA netmask 255.255.255.255 mtu 1412 up + set_vpngateway_route ++ get_default_gw ++ awk '{print $2}' ++ grep '^0.0.0.0' ++ sed 's/^.*:.*$//' ++ sed s/default/0.0.0.0/ ++ netstat -r -n + route add -host CCC 192.168.0.254 add host CCC: gateway 192.168.0.254 + '[' -n '' ']' + set_default_route ++ get_default_gw ++ awk '{print $2}' ++ grep '^0.0.0.0' ++ sed 's/^.*:.*$//' ++ sed s/default/0.0.0.0/ ++ netstat -r -n + DEFAULTGW=192.168.0.254 + echo 192.168.0.254 + route delete default route: gateway required for add or delete command + route add default AAA add net default: gateway AAA + '[' -n 'BBB BBB' ']' + modify_resolvconf_generic + grep '^#@VPNC_GENERATED@' /etc/resolv.conf + cp -- /etc/resolv.conf /var/run/vpnc/resolv.conf-backup + NEW_RESOLVCONF='#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact' + CISCO_DEF_DOMAIN_ORIG=DDD + INTERNAL_IP4_DNS_TEMP='BBB EEE' + exec + read LINE + case "$LINE" in + '[' -n DDD ']' + LINE='domain DDD' + CISCO_DEF_DOMAIN= + NEW_RESOLVCONF='#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact domain DDD' + read LINE + case "$LINE" in + '[' -n 'BBB EEE' ']' + read ONE_NAMESERVER INTERNAL_IP4_DNS_TEMP + LINE='nameserver BBB' + NEW_RESOLVCONF='#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact domain DDD nameserver BBB' + read LINE + case "$LINE" in + NEW_RESOLVCONF='#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact domain DDD nameserver BBB ' + read LINE + exec + for i in '$INTERNAL_IP4_DNS_TEMP' + NEW_RESOLVCONF='#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact domain DDD nameserver BBB nameserver EEE' + '[' -n '' ']' + echo '#@VPNC_GENERATED@ -- this file is generated by vpnc # and will be overwritten by vpnc # as long as the above mark is intact domain DDD nameserver BBB nameserver EEE' + '[' SunOS = Darwin ']' + exit 0 VPNC started in background (pid: 999)... _______________________________________________ vpnc-devel mailing list vpnc-devel[at]unix-ag.uni-kl.de https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel http://www.unix-ag.uni-kl.de/~massar/vpnc/
|