Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Something like this?

share|improve this question

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
share|improve this answer
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. – Nathan Powell Feb 11 '11 at 2:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.