NixUser

NixUser.com | Unix User | Linux User | NixUser

IPTABLES DROP Rule not working

If iptables DROP rule is not working in server, use a REJECT rule instead.

Even if the rule was added, the incoming traffic was not stopped, I used a REJECT rule instead and it stopped all incoming traffic.

$ iptables -I INPUT -s IP_ADDRESS -j REJECT

$ service iptables save

$ service iptables restart

After saving and restarting iptables service, the connections from IP address will be dropped / rejected from the server.