Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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

 
discard

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.