2

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?

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

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .