All pastes #438662 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-13 19:41 UTC
rendered paste body
#! /bin/sh
# $Id: iptables_removeall.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $
. /etc/functions.sh
IPTABLES=iptables

#change this parameters :
include /lib/network
scan_interfaces
config_get EXTIF wan ifname
config_get EXTIP wan ipaddr

#removing the MINIUPNPD chain for nat
$IPTABLES -t nat -F MINIUPNPD
#rmeoving the rule to MINIUPNPD
$IPTABLES -t nat -D PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD
$IPTABLES -t nat -X MINIUPNPD

#removing the MINIUPNPD chain for filter
$IPTABLES -t filter -F MINIUPNPD
#adding the rule to MINIUPNPD
$IPTABLES -t filter -D FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD
$IPTABLES -t filter -X MINIUPNPD