Annotation of embedaddon/miniupnpd/netfilter/iptables_init.sh, revision 1.1.1.1
1.1 misho 1: #! /bin/sh
2: # $Id: iptables_init.sh,v 1.4 2008/04/25 18:15:08 nanard Exp $
3: IPTABLES=iptables
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
19: $IPTABLES -t filter -A FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD
20:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>