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

If my iptables is set to drop packets from certain hosts, is it possible to add a host that can be excepted from this if it is affected?

The hostname I'm wanting to except from these rules is affected by them.

share|improve this question
up vote 4 down vote accepted

You just have to use an ACCEPT rule for this host before the DROP rules you want to avoid.

share|improve this answer
Awesome, thanks. – Blake Jan 28 '12 at 13:20

Rules are evaluated in order, so just make sure that your accept rule comes before the default deny rule.

share|improve this answer
Thanks for that. – Blake Jan 28 '12 at 13:20

This might not be useful in this case, but the default policy(last evaluated rule) can also be changed with the -P ACCEPT.

share|improve this answer

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.