Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

On Linux, I've been building a malicious IP list. I assume the DDOS is now gone. How do I drop the entire INPUT chain from iptables, without affecting the FORWARD or OUTPUT chains?

share|improve this question
up vote 1 down vote accepted

iptables -F optionally takes the chain to flush.

iptables -F INPUT

But you should consider making a separate chain in case you ever legitimately need filtering in INPUT.

share|improve this answer
I tried iptables -F INPUT on a RackSpace cloud node and it froze the server. I had to reboot. Not recommended. I need to find a way to not affect their rules -- only mine. – Volomike May 17 '13 at 13:00
That's why you use a separate chain for this. – Ignacio Vazquez-Abrams May 17 '13 at 13:01
Can you show me how to add a separate INPUT chain so that I can flush just that chain later on? – Volomike May 17 '13 at 13:16
@Volomike: -N will create a new chain. Simply add a rule at/near the end of INPUT that jumps to this chain. – Ignacio Vazquez-Abrams May 17 '13 at 13:25
you could also manually edit the config file. /etc/sysconfig/iptables I believe and then restart the service.... Just don't mess up syntax wise, especially if your remote connecting. – hwshadow May 18 '13 at 8:21

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.