All pastes #1165519 Raw Edit

iptables

public text v1 · immutable
#1165519 ·published 2008-08-11 02:52 UTC
rendered paste body
step 1) logged into VPS box as root

step 2) ran $HOME/firewall.sh (made sure to 'chmod +x' before running):

#!/bin/sh

iptables -A INPUT -i eth0 -m state --state INVALID,NEW -j DROP

step 3) verified rules: 

bach:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       0    --  anywhere             anywhere            state INVALID,NEW

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


step 4) logged in next day

step 5) checked rules:

bach:~# iptables -L
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