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

Dual Access (Static IP + PPTP)

Discussion in 'Tomato Firmware' started by garald50, Oct 26, 2010.

  1. garald50

    garald50 Networkin' Nut Member

    firmware is based on v1.27 (tomato-NDUSB-1.27)

    Static IP :
    [​IMG]
    In Administration-Scripts-Firewall:
    Code:
    #############################################
    sleep 5
    login=zzz
    password=zzz
    server=zzz
    
    if=`nvram get wan_ifname`
    gw=`route | grep default | grep $if | awk '{print $2}'`
    
    /usr/sbin/pppd \
    plugin pptp.so \
    pptp_server $server \
    mtu 1460 mru 1460 \
    user "$login" password "$password" \
    noauth \
    nobsdcomp \
    nodeflate \
    persist \
    usepeerdns \
    defaultroute \
    lcp-echo-failure 5 \
    lcp-echo-interval 30 \
    
    ############################################
    ##41C#430#440#448#440#443#442#44B,  43E 431 449 438 435  434 43B 44F pppoe  438 pptp
    ############################################
    sleep 5
    route add default ppp0
    route del default $if
    
    iptables -t filter -A FORWARD -i ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.112.0/24 -d 0/0 -j MASQUERADE
    iptables -t filter -A FORWARD -i ppp0 -j upnp
    iptables -t nat -A PREROUTING -i ppp0 -j upnp
    iptables -A FORWARD -s 192.168.112.0/24 -j ACCEPT
    iptables -A FORWARD -d 192.168.112.0/24 -j ACCEPT
    iptables -t filter -A FORWARD -i vlan1 -j upnp
    iptables -t filter -A FORWARD -i vlan1 -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -t nat -A PREROUTING -i vlan1 -j upnp
    iptables -t nat -A POSTROUTING -o vlan1 -s 192.168.112.0/24 -d 0/0 -j MASQUERADE
    #iptables -A FORWARD -i ppp+ -j upnp
    #iptables -t nat -A PREROUTING -i ppp+ -j upnp
    redial &
    #########################################
    
    But PPTP-server has encryption (MPPE).
    What strings is it necessary to add to script?
     

Share This Page