Linux Firewalls


Block a specific IP

iptables -A INPUT IP.ADD.RE.SS -j DROP

Block a subnet of IP

To block a range of IPs use the following:

iptables -A INPUT -s IPA.DDR.ESS.0/24 -j DROP

Save Changes

Note: Any changes made using these commands will be lost if the server is rebooted, or if IPTABLES is restarted. You must save your changes to make the permanent.
service iptables save
Author: admin on December 2, 2016
Category: Security

Leave a Reply

You must be logged in to post a comment.

Last articles