[wellylug] Blocking bad IPs from server

John Durham johndurh at spunge.org
Fri Jan 26 08:47:16 NZDT 2007


andrej at paradise.net.nz wrote:
> Quoting John Durham <johndurh at spunge.org>:
>
> iptables and tcpwrappers spring to mind.
>   
Just been reading up on IP tables, but so far have seen nothing to 
address a large list. So far my searches on tcpwrappers has not revealed 
much insight.
For example, at: 
http://www.cyberciti.biz/faq/how-do-i-block-an-ip-on-my-linux-server/

In order to block an IP on your Linux server you need to use iptables 
firewall. First you need to log into shell as root user. To block IP 
address you need to type iptables command as follows:
iptables -A INPUT -s IP-ADDRESS -j DROP

Replace IP-ADDRESS with actual IP address. For example if you wish to 
block ip address 65.55.44.100 for whatever reason then type command as 
follows:

# iptables -A INPUT -s 65.55.44.100 -j DROP

This is limited to one IP at a time (apparently). The page then goes 
from this to even more specific (limited) help. Having got the list 
already, do you know if some variation of this could be used to apply it?

-- 
Regards, John Durham <http://modecideas.com/contact.html?sig>
Fax/Phone 64 4 5286786
Award winning web site at http://modecideas.com?sig
Server hosted on Ubuntu 4.10
PC-HELPERS list subscribe/unsub at http://modecideas.com/discuss.htm?sig
Good advice is like good paint- it only works if applied. 




More information about the wellylug mailing list