Iptables

From gr0x0rd
Jump to navigation Jump to search

Installing iptables

iptables is a secure, robust open-source firewall solution for linux.

$ sudo emerge -av iptables

To ban the IP x.x.x.x,

$ sudo iptables -I INPUT -s x.x.x.x -j DROP

To ban a range of IPs starting with x.x.x,

$ sudo iptables -A INPUT -s x.x.x.0/24 -j DROP