i think i almost have the default pass, i have to understand one more function

This commit is contained in:
2018-11-18 18:19:38 +01:00
parent 8206ede06a
commit 36aeaa07f6
264 changed files with 11666 additions and 1 deletions

35
verb/fs.sbin/vpn-passthru.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
. /sbin/config.sh
. /sbin/global.sh
l2tp_pt=`nvram_get 2860 l2tpPassThru`
ipsec_pt=`nvram_get 2860 ipsecPassThru`
pptp_pt=`nvram_get 2860 pptpPassThru`
# note: they must be removed in order
if [ "$CONFIG_NF_CONNTRACK_SUPPORT" = "y" ]; then
rmmod nf_nat_pptp 1>/dev/null 2>&1
rmmod nf_conntrack_pptp 1>/dev/null 2>&1
rmmod nf_nat_proto_gre 1>/dev/null 2>&1
rmmod nf_conntrack_proto_gre 1>/dev/null 2>&1
else
rmmod ip_nat_pptp 1>/dev/null 2>&1
rmmod ip_conntrack_pptp 1>/dev/null 2>&1
fi
if [ "$pptp_pt" = "1" -o "$l2tp_pt" = "1" -o "$ipsec_pt" = "1" ]; then
if [ "$CONFIG_NF_CONNTRACK_SUPPORT" = "y" ]; then
insmod -q nf_conntrack_proto_gre
insmod -q nf_nat_proto_gre
if [ "$pptp_pt" = "1" ]; then
insmod -q nf_conntrack_pptp
insmod -q nf_nat_pptp
fi
else
insmod -q ip_conntrack_pptp
insmod -q ip_nat_pptp
fi
fi