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.

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
1  
First, can you show the output from iptables-save? –  bahamat Jun 29 '12 at 22:43
1  
Post your entire iptables config. Until you do, it's all guesses. –  MDMarra Jun 30 '12 at 2:03

1 Answer 1

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

 
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.