File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / netfilter / iptables_init.sh
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 00:32:35 2013 UTC (10 years, 11 months ago) by misho
Branches: miniupnpd, elwix, MAIN
CVS tags: v1_8p0, v1_8, HEAD
1.8

    1: #! /bin/sh
    2: # $Id: iptables_init.sh,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $
    3: IPTABLES=/sbin/iptables
    4: 
    5: #change this parameters :
    6: EXTIF=eth0
    7: EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | 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>