Answer the question
In order to leave comments, you need to log in
iptables rules not working. Where is the mistake?
I'm trying to set up iptables.
[email protected]:~# iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP 22 -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Answer the question
In order to leave comments, you need to log in
sudo iptables -A INPUT -p tcp -d 192.168.1.200 --dport 22 -j DROP
instead of 192.168.1.200 is your IP
I would like to see the rules, otherwise INPUT (policy ACCEPT), who drops what, is not clear.
I recommend dropping either by destination IP or by incoming interface
If this is centos, then try to configure 1 any rule through the SETUP command and then edit (I noticed such a bug in 6.5) also in version 7 there is a new crap that acts as a filter (disable or configure)
PS to restart, do not use restart better service iptables stop, service iptables start
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question