ich habe mit gms Hilfe eine Firewall script erstellt.
Diese liegt unter /root/firewall.sh
Nun hab ich die inittab um folgenden Eintrag erweitert:
Code: Alles auswählen
fw:12345:wait:/bin/sh /root/firewall.sh
Tippe ich es auf der Konsole ein geht es jedoch:
Code: Alles auswählen
wolfserver:~# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
wolfserver:~# /bin/sh /root/firewall.sh
wolfserver:~# iptables --list
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT udp -- anywhere anywhere udp dpt:4898 state NEW
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:3128 state NEW
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
wolfserver:~#