ManagerJay
IS-IT--Management
I am running OS X 10.4.10 and I am establishing a connection to my corporate network using the PPTP client. I have removed the check mark from route all traffic over the VPN connection. I am using the following script, located in /etc/ppp/ip-up to add the necessary routes.
#!/bin/sh
# When the pp linkk comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
# Taken from:
#
DEBUGFILE=/tmp/ip-up-debug.txt
echo "1:$1 2:$2 3:$3 4:$4 5:$5 6:$6" > $DEBUGFILE
NET=`echo $5 | cut -d. -f1,2,3`
echo $NET >> $DEBUGFILE
case $NET in 10.129.10)
echo "CASE1" >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.10.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.20.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.30.0 $5 255.255.255.0`
echo $RESULT >> DEBUGFILE
RESULT=`/sbin/route add -net 10.129.50.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.60.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.70.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
;;
echo "No match" >> $DEBUGFILE
;;
esac
If I leave the route to 10.129.60.0 in the script, it will fail everytime and the VPN connection will not connect. Commenting these lines out, the script runs fine.
If the lines are commented, the PPTP connection will connect. Once connected, I am able to add the route manally. I have also tried placing the lines in different places throughout the script, without any success.
The PPTP server is mpd-3.18 running on a FreeBSD 6.2 server.
Any suggestions anyone can offer would be greatly appreciated.
Thanks,
Jay
#!/bin/sh
# When the pp linkk comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
# Taken from:
#
DEBUGFILE=/tmp/ip-up-debug.txt
echo "1:$1 2:$2 3:$3 4:$4 5:$5 6:$6" > $DEBUGFILE
NET=`echo $5 | cut -d. -f1,2,3`
echo $NET >> $DEBUGFILE
case $NET in 10.129.10)
echo "CASE1" >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.10.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.20.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.30.0 $5 255.255.255.0`
echo $RESULT >> DEBUGFILE
RESULT=`/sbin/route add -net 10.129.50.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.60.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
RESULT=`/sbin/route add -net 10.129.70.0 $5 255.255.255.0`
echo $RESULT >> $DEBUGFILE
;;
echo "No match" >> $DEBUGFILE
;;
esac
If I leave the route to 10.129.60.0 in the script, it will fail everytime and the VPN connection will not connect. Commenting these lines out, the script runs fine.
If the lines are commented, the PPTP connection will connect. Once connected, I am able to add the route manally. I have also tried placing the lines in different places throughout the script, without any success.
The PPTP server is mpd-3.18 running on a FreeBSD 6.2 server.
Any suggestions anyone can offer would be greatly appreciated.
Thanks,
Jay