PDA

View Full Version : mod_defensible


planet_fox
24th May 2009, 20:53
Hi Falco,

I try your howto http://howtoforge.com/block-spammers-hackers-with-mod_defensible-on-apache2-debian-etch

and all things is ok.My only problem is this line in apache.conf

DnsblNameserver 145.253.2.75


When I restart Apache restart i become an error

Restarting web server: apache2We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).

falko
25th May 2009, 13:50
Does apache2 -t show any errors? Any errors in Apache's error log?

planet_fox
26th May 2009, 01:05
apache2 -t
apache2: bad user name ${APACHE_RUN_USER}

falko
27th May 2009, 00:10
Try
. /etc/apache2/envvars && apache2 -t

planet_fox
28th May 2009, 10:34
/etc/init.d/apache2 start
Starting web server: apache2Syntax error on line 285 of /etc/apache2/apache2.conf:
Invalid command 'DnsblNameserver', perhaps misspelled or defined by a module not included in the server configuration
failed!
kate:/home/fox# /etc/apache2/envvars && apache2 -t
bash: /etc/apache2/envvars: Permission denied


Look Envvars

cat /etc/apache2/envvars
# envvars - default environment variables for apache2ctl

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid

falko
29th May 2009, 18:25
Please run
a2enmod defensible
and restart Apache.

planet_fox
29th May 2009, 20:26
a2enmod defensible
Module defensible already enabled


/etc/init.d/apache2 restart
Restarting web server: apache2We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).
... waiting Syntax error on line 283 of /etc/apache2/apache2.conf:
Invalid command 'DnsblNameserver', perhaps misspelled or defined by a module not included in the server configuration
failed!

falko
30th May 2009, 13:30
Did you maybe put "DnsblNameserver" into your Apache configuration before the modules get loaded?

jorg
1st June 2009, 09:14
I have the exact same problem, exact same error. I'm using Ubuntu 9.04. My server is already set up with Apache2, so I installed libapache2-mod-defensible and libudns0. Then I enabled mod_defensible with 'a2enmod defensible'. After that I edited /etc/apache2/apache2.conf and put the mod_defensible configuration right before the virtual hosts (exactly like example).

After that I restarted apache2 and I received:
* Restarting web server apache2 * We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
... waiting Syntax error on line 282 of /etc/apache2/apache2.conf:
Invalid command 'DnsblNameserver', perhaps misspelled or defined by a module not included in the server configuration
[fail]

Removing the DnsblNameserver command from /etc/apache2/apache2.conf allows Apache2 to restart properly. Unfortunately all IPs seem to be blocked afterward.

I'm not sure what other relavent information I can provide. The content of my /etc/apt/sources.list file is:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted

deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

deb http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb http://security.ubuntu.com/ubuntu jaunty-security universe
deb-src http://security.ubuntu.com/ubuntu jaunty-security universe
deb http://security.ubuntu.com/ubuntu jaunty-security multiverse
deb-src http://security.ubuntu.com/ubuntu jaunty-security multiverse

deb http://dotdeb.mirror.borgnet.us/ stable all
deb-src http://dotdeb.mirror.borgnet.us/ stable all

@planet_fox: If you find out how to fix this let me know please.