da mein bisheriger WLAN-Router den Geist aufgeben hat, habe ich meinen HP MicroGen Server
als Router konfiguriert. Das funktioniert soweit wunderbar.
Meine Frage ist ob es reicht, alles via iptables zu blocken was auf dem NIC der am DSL-Modem hängt zu blocken, oder sollte/muß ich
noch weiter Maßnahmen zur Absicherung ergreifen?
Der Server soll, sobald die Festplatten da sind, noch als lokaler Fileserver dienen.
NIC eth0: hängt am DSL-Modem
NIC eth1: geht auf einen einfachen Netzwerkswitch
Code: Alles auswählen
#!/bin/sh
PATH=/usr/sbin:/sbin:/bin:/usr/bin
#
# delete all existing rules.
#
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
# Default drop anything, except OUTPUT
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# Always accept loopback traffic
iptables -A INPUT -i lo -j ACCEPT
# Allow established connections, and those not coming from the outside
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW ! -i eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth0 -p icmp -m icmp --icmp-type 8 -j DROP
# Allow outgoing connections from the LAN side.
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
# Masquerade.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# Don't forward from the outside to the inside.
iptables -A FORWARD -i eth0 -o eth0 -j REJECT
Gruß