| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #! /bin/sh | 
|  | 2 | # $Id: iptables_removeall.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_remove.sh start" >> $test_log | 
|  | 8 |  | 
|  | 9 | IPTABLES=iptables | 
|  | 10 |  | 
|  | 11 | #change this parameters : | 
|  | 12 | EXTIF="$defwan_rel" | 
|  | 13 |  | 
|  | 14 | #removing the MINIUPNPD chain for nat | 
|  | 15 | $IPTABLES -t nat -F MINIUPNPD | 
|  | 16 | #removing the rule to MINIUPNPD | 
|  | 17 | #$IPTABLES -t nat -D PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD | 
|  | 18 | $IPTABLES -t nat -D PREROUTING -i $EXTIF -j MINIUPNPD | 
|  | 19 | $IPTABLES -t nat -X MINIUPNPD | 
|  | 20 |  | 
|  | 21 | #removing the MINIUPNPD chain for filter | 
|  | 22 | $IPTABLES -t filter -F MINIUPNPD | 
|  | 23 | #adding the rule to MINIUPNPD | 
|  | 24 | $IPTABLES -t filter -D FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD | 
|  | 25 | $IPTABLES -t filter -X MINIUPNPD |