1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not happy with my vpn setup

Discussion in 'Tomato Firmware' started by cheops2006, Feb 15, 2014.

  1. cheops2006

    cheops2006 Reformed Router Member

    Hi,

    I have setup a PPTP to work but I'm not happy with it because I have to have redirect internet traffic and create NAT checked for it to work. I then use this WANUP script where I got from somewhere else for it to work.


    Code:
    for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
      echo 0 > $i
    done
    
    ip route flush table 100
    ip route del default table 100
    ip rule del fwmark 1 table 100
    ip route flush cache
    iptables -t mangle -F PREROUTING
    
    ip route show table main | grep -Ev ^default | grep -Ev ppp0 \
      | while read ROUTE ; do
          ip route add table 100 $ROUTE
    done
    
    ip route add default table 100 via $(nvram get wan_gateway)
    ip rule add fwmark 1 table 100
    ip route flush cache
    
    iptables -t mangle -A PREROUTING -i br0 -j MARK --set-mark 1
    iptables -t mangle -A PREROUTING -i br1 -j MARK --set-mark 0
    iptables -t mangle -A PREROUTING -i br2 -j MARK --set-mark 0
    iptables -t mangle -A PREROUTING -i br3 -j MARK --set-mark 1
    
    What I want to do is uncheck redirect internet traffic and create NAT and make table 100 my VPN connection.

    Can anybody help me do this.

    Many Thanks
     

Share This Page