#!/bin/sh

set -x

ANYWHERE="0/0"
LOCALHOST="127.0.0.0/8"
INTERNAL_IP="192.168.100.107"
ADMINCLIENT_IP="192.168.100.9"

iptables -F

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT

iptables -A INPUT -j ACCEPT -s $LOCALHOST -d $LOCALHOST
#Zulassen des Serverdienstes hier eintragen
iptables -A INPUT -j ACCEPT -p tcp -s $ANYWHERE -d $INTERNAL_IP --dport 80
iptables -A INPUT -j ACCEPT -p tcp -s $ADMINCLIENT_IP -d $INTERNAL_IP --dport 22
iptables -A INPUT -j LOG -p tcp -s $ANYWHERE -d $ANYWHERE --dport 1:1023
iptables -A INPUT -j DROP -p tcp -s $ANYWHERE -d $ANYWHERE --dport 1:1023
iptables -A INPUT -j LOG -p udp -s $ANYWHERE -d $ANYWHERE --dport 1:1023
iptables -A INPUT -j DROP -p udp -s $ANYWHERE -d $ANYWHERE --dport 1:1023
