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

1.1       misho       1: #! /bin/sh
1.1.1.2 ! misho       2: # $Id: iptables_init.sh,v 1.5 2011/05/16 12:11:37 nanard Exp $
        !             3: IPTABLES=/sbin/iptables
1.1       misho       4: 
                      5: #change this parameters :
                      6: EXTIF=eth0
                      7: EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
                      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>