#!/bin/bash
#

## Firewall Script
#  01-07-26  by Erik Wegner
#  icmp-forward <InternalInterface> <ExternalInterface>
#

EXT=$2  # Interface
INT=$1
if test -z $1 || test -z $2 ; then
	echo "icmp-forward <InternalInterface> <ExternalInterface> "
	echo "e.g.: icmp-forward eth0 ppp0 "
	exit 2
fi

# Pfad zu IPTables
if test -z $IPTABLES ; then
	IPTABLES=/usr/sbin/iptables
fi

## Ports
#  Nicht-privilegierte = 1024-65535
P_HIGH=1024:65535

echo -e "\n# ICMP-Forward $INT -> $EXT"
echo "$IPTABLES -A FORWARD -o $EXT -i $INT -p ICMP --icmp-type echo-request \\"
echo "	-j ACCEPT"
