Difference between revisions of "Iptables"

From DiLab
Jump to: navigation, search
(New page: = 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 11...)
 
(No difference)

Latest revision as of 19:04, 16 April 2012

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 11.22.33.44 IP address to and from your linux computer:

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

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

sudo iptables -vnL