Freitag, 11. September 2009

set up firewall to allow only one ip address

iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -L -v
iptables -A INPUT -s 111.111.111.111 -j ACCEPT # change the IP address as appropriate
iptables-save
rcSuSEfirewall2 restart

do not forget to start firewall automatically

Keine Kommentare: