blob: e942b8c15823828bd9aa72870c37e0512f11890d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#! /bin/sh
2# $Id: iptables_init.sh,v 1.1 2008-09-15 12:28:53 winfred Exp $
3
4path_sh=`nv get path_sh`
5. $path_sh/global.sh
6
7echo "Info: upnp_ipt_init.sh start" >> $test_log
8IPTABLES=iptables
9
10#change this parameters :
11EXTIF=$defwan_rel
12
13#adding the MINIUPNPD chain for nat
14$IPTABLES -t nat -N MINIUPNPD
15#adding the rule to MINIUPNPD
16#$IPTABLES -t nat -A PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD
17$IPTABLES -t nat -I PREROUTING -i $EXTIF -j MINIUPNPD
18
19#adding the MINIUPNPD chain for filter
20$IPTABLES -t filter -N MINIUPNPD
21#adding the rule to MINIUPNPD
22$IPTABLES -t filter -I FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD