Server Fault is a question and answer site for system and network administrators. 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

When I am adding this to iptabls it works

-A INPUT -p tcp --dport 100 -j DROP

But when I try changing the port number to the one i need nothing happens can anyone help?

share|improve this question
First, can you show the output from iptables-save? – bahamat Jun 29 '12 at 22:43
Post your entire iptables config. Until you do, it's all guesses. – MDMarra Jun 30 '12 at 2:03

I guess that you added your rule at the end of the INPUT (-A == APPEND) chain so probably another rule before allows the traffic. Try with something like that:

-I INPUT -p tcp --dport ${PORT_VALUE} -j DROP
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.