That route command won't do anything if the tunnel isn't up, and once the tunnel goes down the route will become invalid and be removed. You need to put the commands in your ip-up script for PPTP so that they are executed every time the tunnel comes up. Search for more info, iirc it's /tmp/pptpd/ip-up.sh by default and you will need to echo the commands into the script or replace it with a saved copy that has your commands. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
That route command won't do anything if the tunnel isn't up, and once the tunnel goes down the route will become invalid and be removed. You need to put the commands in your ip-up script for PPTP so that they are executed every time the tunnel comes up. Search for more info, iirc it's /tmp/pptpd/ip-up.sh by default and you will need to echo the commands into the script or replace it with a saved copy that has your commands.
phuzion, i need your help, as per your suggestion i did the below:
i changed the original command posted in the first page to 2 parts, 1 part in firewall is this:
echo "sleep 40" > /tmp/firewall_script.sh
echo "for i in ebtables ebt_mark ebtable_filter ebtable_nat; do insmod \$i; done" >> /tmp/firewall_script.sh
echo "ebtables -t nat -F" >> /tmp/firewall_script.sh
echo "iptables -t mangle -F" >> /tmp/firewall_script.sh
echo "ebtables -t nat -A PREROUTING -i wl0.2 -j mark --set-mark 4" >> /tmp/firewall_script.sh
echo "ebtables -t nat -A PREROUTING -i vlan1 -j mark --set-mark 4" >> /tmp/firewall_script.sh
chmod +x /tmp/firewall_script.sh
sh /tmp/firewall_script.sh &
i then echoed the other route commands to ip-up:
echo "ip rule del from 0/0 fwmark 4 lookup 4" >> /tmp/pptpd_client/ip-up
echo "ip route flush table 4" >> /tmp/pptpd_client/ip-up
echo "ip route show table main | grep -Ev ^default | while read ROUTE; do ip route add table 4 \$ROUTE; done" >> /tmp/pptpd_client/ip-up
echo "ip route add table 4 default dev ppp0" >> /tmp/pptpd_client/ip-up
echo "ip rule add fwmark 4 table 4" >> /tmp/pptpd_client/ip-up
echo "ip route flush cache" >> /tmp/pptpd_client/ip-up
so now this should ideally work right? but it looks like the route commands added to ip-up disappear on reboot of router.