I changed the script so i can use it fore apache and horde webmail
i think a lot of people can benefit from this but need some help.
this is what i'v done, the script is called by a php entry: exec('/usr/bin/blockhosts.py');
this can be placed in a error document or a faild login page this works fine.
canges to the script.
in line line 678 got rid of te : after the %s
further changes :
"HOSTS_BLOCKFILE": "/var/www/html/.htaccess"
"BLOCK_SERVICES": "deny from"
HOSTS_DENY_SUFFIX = ""
this result in a htaccess file:
order deny,allow
#---- BlockHosts Additions
deny from 10.0.0.23
#bh: ip: 10.0.0.23 : 66 : 2007-02-26-18-41
#bh: logfile: /var/log/messages
#bh: offset: 189219
#bh: first line:Feb 25 13:01:26 localhost syslogd 1.4.1: restart.
#---- BlockHosts Additions
and bloks the hacker from te webserver.
the part i cant get becouse i dont understand the caracters the lines to read the logs,
got 2 logs one is apache and one is horde log.
[Mon Feb 26 19:06:47 2007] [error] [client 10.0.0.23] user jasper: authentication failure for "/private": Password Mismatch
Feb 26 00:11:05 HORDE [error] [horde] FAILED LOGIN for jasper [127.0.0.1] to Horde [on line 117 of "/var/www/html/horde/login.php"]
if some one coult take the trouble of making the apropiate sintax for these lines
it would be amazing and a lot of people are waiting for this at the hore community.
futher i would need to call the blockhosts script bij a other script so its not run by user Apache.
thanks jasper
the netherlands.
Recent comments
1 week 5 days ago
2 weeks 6 days ago
2 weeks 6 days ago
3 weeks 3 days ago
7 weeks 5 days ago
9 weeks 4 days ago
12 weeks 6 days ago
17 weeks 17 hours ago
17 weeks 5 days ago
20 weeks 11 hours ago