Nasser Heidari


Rusty Russell’s Quick Guide To Packet Filtering

Filed under: Linux — Nasser Heidari @ 07:20

Most people just have a single connection to the Internet, and don’t want anyone coming back into their network, or the firewall:

# insmod ip_conntrack
# insmod ip_conntrack_ftp
# insmod iptables
# insmod ipt_state
# iptables -N block
# iptables -P INPUT DROP
# iptables -P FORWARD DROP
# iptables -A INPUT -j block
# iptables -A FORWARD -j block
# iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -A block -m state --state NEW -i ! ppp0 -j ACCEPT

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: