#!/bin/bash
#

## Firewall Script
#  01-07-26  by Erik Wegner
#  fw-ifconfig <Interface>
#

INT=$1  # Interface

if test -z $1 ; then
	echo "fw-ifconfig <Interface>"
	echo "e.g.: fw-ifconfig eth0"
	exit 2
fi

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

# Pfad zu Netzwerk innerhalb von /proc
PROC=/proc/sys/net/ipv4
echo " "
echo "# $INT wird konfiguriert "
echo "if test -x $PROC/conf/$INT ; then"
echo "	echo \"1\" > $PROC/conf/$INT/rp_filter"
echo "	echo \"0\" > $PROC/conf/$INT/accept_redirects"
echo "	echo \"0\" > $PROC/conf/$INT/accept_source_route"
echo "	echo \"0\" > $PROC/conf/$INT/bootp_relay"
echo "	echo \"1\" > $PROC/conf/$INT/log_martians"
echo "fi"

