#1 (permalink)  
Old 11-08-2005, 02:23 AM
Registered User
 
Join Date: Dec 2003
Posts: 33
gal3ler
mod_security problems

It appears after something has been written to the audit_log when running
10.8.1-R21 when you click on mod_security in WHM it shows up with the header
saying mod_security and the page blank.

http://bugzilla.cpanel.net/show_bug.cgi?id=3486
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-08-2005, 09:13 AM
bamasbest's Avatar
Registered User
 
Join Date: Jan 2004
Posts: 531
bamasbest
Funny, no blank page for me 10.8.1-S23

Is your mysql database "modsec" being updated hoursly by the modsec cron job?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-04-2005, 02:44 PM
Registered User
 
Join Date: Nov 2002
Posts: 53
paint
Make sure you have this in your httpd.conf

SecAuditEngine On
SecAuditLog logs/audit_log

This fixed the problem for me.
__________________
www.HostDome.com
MSN: Sales@HostDome.com
AIM: HDomeJosh
EMail: Paint@HostDome.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-04-2005, 04:00 PM
Registered User
 
Join Date: Nov 2002
Posts: 53
paint
Also once you do that, you need to make a slight change.
pico /etc/cron.hourly/modsecparse.pl
go to the $dbpassword= line and get your password. Then,

pico /usr/local/cpanel/whostmgr/docroot/cgi/addon_modsec.cgi
and make sure that the password for $dbpassword=" matches. If not, change it and save the file. Then it should show up fine for you.
__________________
www.HostDome.com
MSN: Sales@HostDome.com
AIM: HDomeJosh
EMail: Paint@HostDome.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-04-2005, 06:25 PM
myusername's Avatar
Registered User
 
Join Date: Mar 2003
Location: Smokin!
Posts: 648
myusername is on a distinguished road
Not that the edit button works in Internet Explorer anyways if you do get it to show up you need to use FireFox
__________________
chown -R us.us *yourbase*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2006, 07:06 AM
Registered User
 
Join Date: Jan 2004
Posts: 21
kapOcha
Quote:
Originally Posted by paint
Also once you do that, you need to make a slight change.
pico /etc/cron.hourly/modsecparse.pl
go to the $dbpassword= line and get your password. Then,

pico /usr/local/cpanel/whostmgr/docroot/cgi/addon_modsec.cgi
and make sure that the password for $dbpassword=" matches. If not, change it and save the file. Then it should show up fine for you.

Great! It worked for me.
bye
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-31-2007, 12:19 PM
Registered User
 
Join Date: Apr 2002
Posts: 50
stugster
Angry

Sorry to exhume such an old thread, but since upgrading to mySQL 5, I have been having this issue with the hourly cron too.

----------

/etc/cron.hourly/modsecparse.pl:

DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl line 19 Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19.

----------


Also, on top of this error, a few clients are complaining that Horde is now giving the error:

"A fatal error has occured, could not connect to database for sql sessionhandler".


mySQL however appears to be working and querying the database through PHP or directly is working fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-19-2007, 01:49 AM
Registered User
 
Join Date: Feb 2003
Posts: 191
HostIt is on a distinguished road
We're now experiencing the same problem here, across multiple servers. Every hour:

Code:
/etc/cron.hourly/modsecparse.pl:

DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl line 19
Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19.
I've checked the two passwords as per the previous post by "paint" and they do appear to match in all cases. Also, as per paint's other post, the following lines are already included in httpd.conf by default via /usr/local/apache/conf/modsec.conf

Code:
SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log
Any chance somebody might have found a fix for this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-09-2008, 12:18 PM
Registered User
 
Join Date: Oct 2002
Posts: 67
rsutc
Following an upgrade to MySQL 5, I also have the same problem. I have checked the passwords match per the above and all is OK. I have looked at the template for modsec and find it contains
<IfModule mod_security.c>
SecFilterEngine On
SecFilterCheckURLEncoding On
SecFilterForceByteRange 0 255
SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log
SecFilterDebugLog logs/modsec_debug_log
SecFilterDebugLevel 0
SecFilterDefaultAction "deny,log,status:406"
SecFilterSelective REMOTE_ADDR "^127.0.0.1$" nolog,allow
Include "/usr/local/apache/conf/modsec.user.conf"
</IfModule>


However, this material is NOT in the usr/local/apache/confhttp.conf file

One possible way to proceed would be to use whm/plugins/Mod Security and turn it off then on again. However, that choice produces only a blank screen

What has to be done?
__________________
Rick Sutcliffe
http://www.webnamehost.net
a.k.a. The Northern Spy http://www.thenorthernspy.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-10-2008, 08:36 AM
Registered User
 
Join Date: Oct 2002
Posts: 67
rsutc
Maybe I could ask the question this way. What are the (paths to) scripts that shut down mod security and restart it?

Rick
__________________
Rick Sutcliffe
http://www.webnamehost.net
a.k.a. The Northern Spy http://www.thenorthernspy.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 05-20-2008, 01:51 AM
Registered User
 
Join Date: Mar 2002
Posts: 174
jsnape
Quote:
Originally Posted by rsutc View Post
Following an upgrade to MySQL 5, I also have the same problem. I have checked the passwords match per the above and all is OK. I have looked at the template for modsec and find it contains
<IfModule mod_security.c>
SecFilterEngine On
SecFilterCheckURLEncoding On
SecFilterForceByteRange 0 255
SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log
SecFilterDebugLog logs/modsec_debug_log
SecFilterDebugLevel 0
SecFilterDefaultAction "deny,log,status:406"
SecFilterSelective REMOTE_ADDR "^127.0.0.1$" nolog,allow
Include "/usr/local/apache/conf/modsec.user.conf"
</IfModule>


However, this material is NOT in the usr/local/apache/confhttp.conf file

One possible way to proceed would be to use whm/plugins/Mod Security and turn it off then on again. However, that choice produces only a blank screen

What has to be done?
For anyone reading this post - the same thing happened to me. Upgraded to Apache 2.2, and mod security was producing a blank screen.

I fixed it by emptying the *huge* (1.9GB) modsec table in mysql and recompiled apache.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 05-21-2008, 10:07 AM
wolfy's Avatar
Registered User
 
Join Date: Jul 2005
Location: Canada
Posts: 45
wolfy is on a distinguished road
fyi. whm/plugins/Mod Security is now obsoliete.
instalation of mod_security is now handled by easyapache3
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 07-13-2009, 01:54 PM
FeeL's Avatar
Registered User
 
Join Date: Apr 2004
Location: Rio de janeiro
Posts: 128
FeeL is on a distinguished road
Question Upgrading mysql



I had the same error told by stugster.
Should I disable the whm/plugins/Mod Security ?
Whould it prevent the error of the cron?

Thank you.
__________________
-----------
FeeL Buarque
SysAdmin.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:18 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc