1

What's the proper way to drop all packets destined for the firewall host from the outside?

Something like this?

$IPT -A INPUT -i $INTERNET -s 0/0 -d $HOST_NAME -j DROP

1 Answer 1

2

The proper way is to have a your policy default to drop, then only accept things from the outside that you specifically want.

/sbin/iptables -t filter -A INPUT -j DROP  # set default deny policy
/sbin/iptables -t filter -A OUTPUT -j DROP
# Set rules to permit traffic
...
1
  • While I agree that you should drop anything not specifically allowed, I like to make the last rule in the chain a DROP so at 4 in the morning when the shit is hitting the fan, one can flush the ruleset with out locking oneself out. Feb 11, 2011 at 2:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .