Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: moleboy on October 19, 2005, 10:39:35 AM

Title: How to block incoming IP address from accessing server
Post 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
Title: How to block incoming IP address from accessing server
Post by: Curly on October 19, 2005, 07:14:40 PM
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.
Title: How to block incoming IP address from accessing server
Post by: splunk on October 30, 2005, 09:48:28 PM
Where would you reccomend putting it so that it will repeat after reboot?
Title: How to block incoming IP address from accessing server
Post by: Curly on October 30, 2005, 10:10:44 PM
A good place to put this, would be the file /etc/rc.d/rc.local . This script is executed last at boot-time.
Title: How to block incoming IP address from accessing server
Post by: juncool on November 05, 2005, 06:44:51 AM
hi, how about blocking range of ip addresses and certain services only like internet access but not ftp or ibay?

thanks,

- juncool 8-)