You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 2008-12-15 4:12 pm
- SeanDuffy
- Member
- From: Whitehaven
- Registered: 2008-12-14
- Posts: 12
- Website
htaccess
Would it be possible for http://www.stopforumspam.com to auto generate a htaccess txt file with the top spammers included?
At the moment, when copying the IP addresses, I have to manually add 'deny from ' prior to the IP address. This would be a great help.
Thanks.
Sean.
Offline
#2 2008-12-15 4:16 pm
- MysteryFCM
- Member
- From: Tyneside, UK
- Registered: 2008-01-16
- Posts: 606
- Website
Re: htaccess
I wouldn't actually recommend using htaccess for this as they'll never stay the same, and would thus require constant changing.
Instead I'd recommend you have your app query the database for the visitors IP, and decide from there whether or not to ban them.
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net
Offline
#3 2008-12-16 4:56 am
- scrow
- Member
- Registered: 2008-12-16
- Posts: 2
Re: htaccess
daily cronjob oneliner that converts the CSV into an .htaccess file, uploads it and renames.
uses linux/bash, lynx, and ncftpput
# dirty forum spammers
5 0 * * * echo "order allow,deny" > /root/block_spammers.htaccess ; for i in `lynx -source http://www.stopforumspam.com/downloads/bannedips.csv | sed 's/,/\\n/g'` ; do echo "deny from $i" >> /root/block_spammers.htaccess ; done ; echo "allow from all" >> /root/block_spammers.htaccess && ncftpput -u username -p password -Y "RNFR /dir/htdocs/block_spammers.htaccess" -Y "RNTO /dir/htdocs/.htaccess" ftp.domain.com /dir.com/htdocs /root/block_spammers.htaccess &> /dev/null
Offline
Pages: 1