Reply to comment

made blockhost for apache and horde webmail

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.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <b> <span> <pre> <hr>
  • Lines and paragraphs break automatically.
  • You may use [acidfree:xx] tags to display acidfree videos or images inline.
  • [l:URL text] input tags replaced with HTML links. URL may be Drupal internal path. [ Link Filter Tips ]

More information about formatting options