Annotation of embedaddon/miniupnpd/netfilter/iptables_init.sh, revision 1.1.1.3

1.1       misho       1: #! /bin/sh
1.1.1.3 ! misho       2: # $Id: iptables_init.sh,v 1.6 2012/01/02 09:55:20 nanard Exp $
1.1.1.2   misho       3: IPTABLES=/sbin/iptables
1.1       misho       4: 
                      5: #change this parameters :
                      6: EXTIF=eth0
1.1.1.3 ! misho       7: EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`"
1.1       misho       8: echo "External IP = $EXTIP"
                      9: 
                     10: #adding the MINIUPNPD chain for nat
                     11: $IPTABLES -t nat -N MINIUPNPD
                     12: #adding the rule to MINIUPNPD
                     13: #$IPTABLES -t nat -A PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD
                     14: $IPTABLES -t nat -A PREROUTING -i $EXTIF -j MINIUPNPD
                     15: 
                     16: #adding the MINIUPNPD chain for filter
                     17: $IPTABLES -t filter -N MINIUPNPD
                     18: #adding the rule to MINIUPNPD
1.1.1.2   misho      19: $IPTABLES -t filter -A FORWARD -i $EXTIF ! -o $EXTIF -j MINIUPNPD
1.1       misho      20: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>