| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #! /bin/sh | 
|  | 2 | # $Id: iptables_init.sh,v 1.1 2008-09-15 12:28:53 winfred Exp $ | 
|  | 3 |  | 
|  | 4 | path_sh=`nv get path_sh` | 
|  | 5 | . $path_sh/global.sh | 
|  | 6 |  | 
|  | 7 | echo "Info: upnp_ipt_init.sh start" >> $test_log | 
|  | 8 | IPTABLES=iptables | 
|  | 9 |  | 
|  | 10 | #change this parameters : | 
|  | 11 | EXTIF=$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 |