Server getting hammered by P2P clients...

ARGH! Apparently, somehow, my web server got added to a "Gnutella seed" as a cache node? So I'm getting about five hits a second to a page that doesn't exist, http://mydomain/gnucache/gcache.php. It's driving me nuts and my server load is much higher than I would deem acceptable.

I was thinking about replacing it with some kind of script that would iptables-drop the requesting IP.

1) Would apache have any issues with firewalling an active connection?

2) How could I do this? You have to be root to execute iptables commands, eh? I guess <?php $kill = shell_exec("/sbin/iptables -I INPUT -s {$_SERVER['REMOTE_ADDR']} -j DROP"); ?> wouldn't work...

hmm.. maybe if I give a user privileges to add iptables rules, and then use suexec creatively.. stupid file sharers.

 

 

 

 

Top