From DiLab
Jump to: navigation, search

Block an IP address

You might have found an IP address attacking your linux computer, for example, by looking at the /var/log/auth.log file. You can use iptables to block the IP address to and from your linux computer:

sudo iptables -I INPUT -s -j DROP
sudo iptables -I OUTPUT -d -j DROP

You can also see the status of the blocked IP addresses:

sudo iptables -vnL