Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: moleboy on October 19, 2005, 10:39:35 AM
-
Over the last couple of days an IP address originating from Nigeria has been systematically hammering a website hosted on my SME server (SME Server 6.0.1-01).
How can I configure SME server to block this particular IP address from accessing the web server?
(I don't care if by blocking this IP address I never receive email from it.)
Many thanks,
Ritchie
-
Use the firewall:
/sbin/iptables -I INPUT -s 123.123.123.123 -j DROP
replace the 123.123.123.123 with the ip-address you want to block. To make this stick when you reboot, you'll need to put this command somewhere.
-
Where would you reccomend putting it so that it will repeat after reboot?
-
A good place to put this, would be the file /etc/rc.d/rc.local . This script is executed last at boot-time.
-
hi, how about blocking range of ip addresses and certain services only like internet access but not ftp or ibay?
thanks,
- juncool 8-)