version 1.1.1.1, 2012/02/21 23:16:02
|
version 1.1.1.3, 2013/07/22 00:32:35
|
Line 1
|
Line 1
|
#! /bin/sh |
#! /bin/sh |
# $Id$ |
# $Id$ |
IPTABLES=iptables | 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 |
Line 16 $IPTABLES -t nat -A PREROUTING -i $EXTIF -j MINIUPNPD
|
Line 16 $IPTABLES -t nat -A PREROUTING -i $EXTIF -j MINIUPNPD
|
#adding the MINIUPNPD chain for filter |
#adding the MINIUPNPD chain for filter |
$IPTABLES -t filter -N MINIUPNPD |
$IPTABLES -t filter -N MINIUPNPD |
#adding the rule to MINIUPNPD |
#adding the rule to MINIUPNPD |
$IPTABLES -t filter -A FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD | $IPTABLES -t filter -A FORWARD -i $EXTIF ! -o $EXTIF -j MINIUPNPD |
|
|