Fixing netfilter/iptables_*.sh scripts for new ifconfig output format
see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=2623
This commit is contained in:
parent
24065dbaba
commit
63a83f8a0a
|
@ -1,5 +1,8 @@
|
||||||
$Id: Changelog.txt,v 1.242 2011/11/18 11:21:20 nanard Exp $
|
$Id: Changelog.txt,v 1.242 2011/11/18 11:21:20 nanard Exp $
|
||||||
|
|
||||||
|
2012/01/02:
|
||||||
|
Fixing netfilter/iptables_*.sh scripts for new ifconfig output format.
|
||||||
|
|
||||||
2011/11/18:
|
2011/11/18:
|
||||||
avoid infinite loop in SendResp_upnphttp() in case of error
|
avoid infinite loop in SendResp_upnphttp() in case of error
|
||||||
Replaced SendResp_upnphttp() + CloseSocket_upnphttp() by
|
Replaced SendResp_upnphttp() + CloseSocket_upnphttp() by
|
||||||
|
|
|
@ -4,7 +4,7 @@ IPTABLES=/sbin/iptables
|
||||||
|
|
||||||
#change this parameters :
|
#change this parameters :
|
||||||
EXTIF=eth0
|
EXTIF=eth0
|
||||||
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
|
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`"
|
||||||
echo "External IP = $EXTIP"
|
echo "External IP = $EXTIP"
|
||||||
|
|
||||||
#adding the MINIUPNPD chain for nat
|
#adding the MINIUPNPD chain for nat
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
EXTIF=eth0
|
EXTIF=eth0
|
||||||
IPTABLES=/sbin/iptables
|
IPTABLES=/sbin/iptables
|
||||||
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
|
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`"
|
||||||
NDIRTY="`LC_ALL=C /sbin/iptables -t nat -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
|
NDIRTY="`LC_ALL=C /sbin/iptables -t nat -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
|
||||||
FDIRTY="`LC_ALL=C /sbin/iptables -t filter -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
|
FDIRTY="`LC_ALL=C /sbin/iptables -t filter -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
|
||||||
echo "External IP = $EXTIP"
|
echo "External IP = $EXTIP"
|
||||||
|
|
|
@ -4,7 +4,7 @@ IPTABLES=/sbin/iptables
|
||||||
|
|
||||||
#change this parameters :
|
#change this parameters :
|
||||||
EXTIF=eth0
|
EXTIF=eth0
|
||||||
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
|
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`"
|
||||||
|
|
||||||
#removing the MINIUPNPD chain for nat
|
#removing the MINIUPNPD chain for nat
|
||||||
$IPTABLES -t nat -F MINIUPNPD
|
$IPTABLES -t nat -F MINIUPNPD
|
||||||
|
|
Loading…
Reference in New Issue