Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nocat / libexec / loopback / initialize.fw
blob7368b80960dc33820f279cde1d02bf08cf4386c3
1 #!/bin/sh
3 # Note: your PATH is inherited from the gateway process
5 # Enable IP forwarding.
7 # echo "1" > /proc/sys/net/ipv4/ip_forward
9 # iptables -t filter -P OUTPUT ACCEPT
11 # Flush all user-defined chains
13 for chain in NoCat_OK NoCat_Cap; do
14 iptables -t nat -N $chain 2>/dev/null
15 iptables -t nat -F $chain
16 iptables -t nat -D OUTPUT -j $chain 2>/dev/null
17 iptables -t nat -A OUTPUT -j $chain
18 done
22 # Redirect outbound non-auth web traffic to the local gateway process
24 # iptables -t nat -A NoCat_OK -j LOG --log-level info
25 iptables -t nat -A NoCat_Cap -p tcp --dport 80 \
26 -j REDIRECT --to-port $GatewayPort
27 iptables -t nat -A NoCat_Cap -p tcp --dport 443 \
28 -j REDIRECT --to-port $GatewayPort