Everything works fine until you want to brows the internet.
For some reason the old ip-up would route the internet request well and the last version is blocking all internet connection leaving you withouth internet while vpn conection is on.
I have replaced ip-up with one ip-up from older version look at ( quoted peace) now it is working.
I would like to check if this was the proper way to handle.
#!/bin/sh
PATH=/boot/bin:/pkg/bin:/pkg/sbin:/pkg/rc:/rc:/bin:/sbin
export PATH
for i in 1 2 3 4 5 6 7 8 9 10; do
a="1.1.1.$i"
if [ "$4" = "$a" ]; then
rc_dns restart
exit 0
fi
done
A=$4;B=$5;C=$1
set -- ""
set -- `cat /etc/pptpd.conf |sed '/^#/d' |sed -n '/localip/P' |sed 's/.*locali
N=$4; [ $5 ] && IPSTOP=$5 || IPSTOP=$4
while [ $N -le $IPSTOP ]; do
if [ "$A" = "$1.$2.$3.$N" ]; then
ipfwadm -I -i accept -b -W $C -S $B -o
ipfwadm -F -i masquerad -b -S $B -o
rc_dns restart
exit 0
fi
N=`expr $N + 1` done . /etc/system.cfg . /etc/shaper.cfg . /etc/live.cfg echo "Your inet addr: $A<br>ISP P-t-P: $B" >/tmp/state [ $DNS1 ] && b="DNSDDR=$DNS1" [ $DNS2 -a $DNS1 != $DNS2 ] && c="DNSDDR1=$DNS2" cat >/etc/live.cfg <<~ ROUTER=$ROUTER BOOTMOD=$BOOTMOD VERSION=$VERSION BOOTDEV=$BOOTDEV BOOTIME="$BOOTIME" PPPLINK=$C IPADDR=$A $b $c ~ [ "$SPPP" = y ] && date >/tmp/connect && chmod 644 /tmp/connect chmod 644 /etc/live.cfg
rc_main newip ip-up if [ "$SHPR" = y ]; then a=`cat /var/shaper.ppp` shapecfg attach shaper$a $C shapecfg speed shaper$a ${SPEEDPPP:-50000} ifconfig shaper$a $A route add default shaper$a for i in $NOLIMIT; do route add -host $i $C done fi exit 0
