2 REMOTESUB
=$
(/bin
/nvram get pptp_client_srvsub
)
3 REMOTENET
=$
(/bin
/nvram get pptp_client_srvsubmsk
)
6 /sbin
/route add
-net $REMOTESUB netmask
$REMOTENET dev
$1
7 /usr
/sbin
/iptables
--insert OUTPUT
--source 0.0.0.0/0.0.0.0 --destination $REMOTESUB/$REMOTENET --jump ACCEPT
--out-interface $1
8 /usr
/sbin
/iptables
--insert INPUT
--source $REMOTESUB/$REMOTENET --destination 0.0.0.0/0.0.0.0 --jump ACCEPT
--in-interface $1
9 /usr
/sbin
/iptables
--insert FORWARD
--source 0.0.0.0/0.0.0.0 --destination $REMOTESUB/$REMOTENET --jump ACCEPT
--out-interface $1
10 /usr
/sbin
/iptables
--insert FORWARD
--source $REMOTESUB/$REMOTENET --destination 0.0.0.0/0.0.0.0 --jump ACCEPT
--in-interface $1
11 /usr
/sbin
/iptables
--insert FORWARD
--protocol tcp
--tcp-flags SYN
,RST SYN
--jump TCPMSS
--clamp-mss-to-pmtu
12 if [ "$(/bin/nvram get pptp_client_nat)" = "1" ]; then
13 /usr
/sbin
/iptables
--table nat
--append POSTROUTING
--out-interface $1 --jump MASQUERADE
15 /sbin
/service dnsmasq restart