Iptables

From DiLab
Revision as of 19:04, 16 April 2012 by Leo (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 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