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

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

3 Answers 3

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

 
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.