mod_evasive + dos-xxx.xxx.xxx.xxx

pppplus

Verified User
Joined
Dec 19, 2008
Messages
526
Hi

I installed some weeks before mod_evasive.

It writes a lot of files in /tmp directory
dos-xxx.xxx.xxx.xxx (where xxx are IP)

Some of these files are very old. I begin to delete them.

Is it a good idea to delete old files or not ?

I do that, because of a possible problem :
Sometimes, PHP sessions expires several times in some minutes.
After deleting a lot of these files dos-xxx, it seems to be better for sessions which stop to expire whitout reason.

Note sure, but maybe too much files in /tmp ?
 
Hello,

Set up tmpwatch to clear temporary directories once per day or less frequently.
Probably your /tmp partition is too small, and there is no place for new sessions files.
 
Thanks zEitEr

I suppose I have a problem like this, but I am not sure, and I do not understand why I have a problem of space.

I have less than 100Mo in /tmp folder
After deleting a lot of files, I have always about 82-95Mo of datas.
And size of /tmp is 1008 Mo (occupation = 17% with df -h)

In /etc/cron.daily/tmpwatch, I have :
Code:
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
	-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp

If I understand, it deletes all files oldest than 240 hours (10 days!) in /tmp directory.

So I could decrease 240 to 24 or 48 hours.
But why have I problem of space ? Or another problem that can stop sessions.
From this morning after deletion of oldest files, I have no more problem of sessions.
 
What does
Code:
 df -i
show, when sessions failed to initiate?

Yes, that would be ok to decrease 240 to 24 or 48 hours.
 
Thanks

I do not understand :

df -i shows inodes ? so no real differences with df -h.
Occupation in % is globally the same than with df -h for me.

Or maybe you are asking to do it when I have problem with sessions ?
 
Back
Top