Current time: 12-23-2024, 01:45 PM Hello There, Guest! (LoginRegister)


Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ERLEDIGT] fail2ban und iptables
Author Message
vbbaby Offline
Junior Member
*

Posts: 58
Joined: Jun 2007
Reputation: 0
Post: #1
Sad [ERLEDIGT] fail2ban und iptables
Moin....
manchmal kann man auf meinem Server keine Emails mehr senden und empfangen....das heißt die Mails werden zwar vom Server empfangen, allerdings nicht an die User ausgeteilt.....
Nach einigen Nachforschungen habe ich nun folgendes im Logfile von fail2ban gefunden:

Quote:2008-02-06 23:53:58,608 fail2ban.actions: WARNING [ssh] Ban 121.131.150.11
2008-02-07 00:43:58,818 fail2ban.actions: WARNING [ssh] Unban 121.131.150.11
2008-02-07 04:44:11,491 fail2ban.actions: WARNING [ssh] Ban 62.146.49.160
2008-02-07 05:34:11,652 fail2ban.actions: WARNING [ssh] Unban 62.146.49.160
2008-02-07 08:44:04,323 fail2ban.actions: WARNING [ssh] Ban 58.60.230.84
2008-02-07 09:34:04,566 fail2ban.actions: WARNING [ssh] Unban 58.60.230.84
2008-02-07 10:44:50,055 fail2ban.actions: WARNING [ssh] Ban 64.16.139.209
2008-02-07 11:34:50,144 fail2ban.actions: WARNING [ssh] Unban 64.16.139.209
2008-02-07 11:46:02,176 fail2ban.actions: WARNING [ssh] Ban 74.200.77.159
2008-02-07 12:36:02,678 fail2ban.actions: WARNING [ssh] Unban 74.200.77.159
2008-02-07 12:41:09,791 fail2ban.actions: WARNING [ssh] Ban 72.44.69.122
2008-02-07 13:31:10,031 fail2ban.actions: WARNING [ssh] Unban 72.44.69.122
2008-02-07 13:52:29,104 fail2ban.actions: WARNING [ssh] Ban 168.243.7.142
2008-02-07 14:42:29,200 fail2ban.actions: WARNING [ssh] Unban 168.243.7.142
2008-02-07 14:42:29,200 fail2ban.actions.action: ERROR iptables -n -L INPUT | grep -q fail2ban-ssh returned -1
2008-02-07 14:42:29,201 fail2ban.actions.action: ERROR Invariant check failed. Trying to restore a sane environment
2008-02-07 14:42:29,201 fail2ban.actions.action: ERROR iptables -D INPUT -p tcp --dport ssh -j fail2ban-ssh
iptables -F fail2ban-ssh
iptables -X fail2ban-ssh returned -1
2008-02-07 14:42:29,202 fail2ban.actions.action: ERROR iptables -N fail2ban-ssh
iptables -A fail2ban-ssh -j RETURN
iptables -I INPUT -p tcp --dport ssh -j fail2ban-ssh returned -1
2008-02-07 14:42:29,202 fail2ban.actions.action: ERROR iptables -n -L INPUT | grep -q fail2ban-ssh returned -1
2008-02-07 14:42:29,202 fail2ban.actions.action: CRITICAL Unable to restore environment

Wahrscheinlich wurden also seit 14:42 keine Mails mehr verteilt und man konnte auch keine versenden, das würde zumindest hinkommen.....Rolleyes

Hat jemand eine Ahnung wie ich das Problem hier lösen kann ?
Danke schon mal für jeglichen Tipp....Smile
(This post was last modified: 02-11-2008 02:10 AM by joximu.)
02-08-2008 06:32 AM
Find all posts by this user
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #2
RE: fail2ban und iptables
vbbaby Wrote:Wahrscheinlich wurden also seit 14:42 keine Mails mehr verteilt...

Wieso prüfst du diese aussaage nicht indem du in den die logs von postfix schaust? Wenn da keinerlei zugriffe seit 14:42 gekommen sind wird das stimmen...

Bitte postet in dem Forum Fakten nicht Vermutungen...
02-08-2008 06:50 AM
Visit this user's website Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: fail2ban und iptables
Das Log vom fail2ban zeigt ja nur ssh Sachen, also hat mit Mail wenig zu tun.
02-08-2008 07:02 AM
Visit this user's website Find all posts by this user
vbbaby Offline
Junior Member
*

Posts: 58
Joined: Jun 2007
Reputation: 0
Post: #4
RE: fail2ban und iptables
OK das Problem scheint hier wohl doch auch etwas anderes zu sein Sad

Habe nun im Maillog folgendes gefunden:

Quote:Feb 7 14: tpd[9349]: disconnect from unknown[83.4.193.36]
Feb 7 14: tpd[9349]: connect from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: lost connection after CONNECT from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: disconnect from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: connect from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: lost connection after CONNECT from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: disconnect from localhost[127.0.0.1]
Feb 7 14: tpd[9349]: connect from fmmailgate01.web.de[217.72.192.221]
Feb 7 14:ster[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14: ge repeated 3 times
Feb 7 14:gr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:ster[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:ge repeated 4 times
Feb 7 14:gr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:ster[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:37:34 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:37:38 h1307630 courierpop3login: fork: Cannot allocate memory
Feb 7 14:37:42 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:37:56 h1307630 last message repeated 2 times
Feb 7 14:38:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:38:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:38:56 h1307630 last message repeated 4 times
Feb 7 14:39:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:39:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:39:56 h1307630 last message repeated 4 times
Feb 7 14:40:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:40:15 h1307630 postfix/anvil[6115]: statistics: max connection rate 3/60s for (smtp:83.31.5.77) at Feb 7 14:30:29
Feb 7 14:40:15 h1307630 postfix/anvil[6115]: statistics: max connection count 1 for (smtp:83.31.5.77) at Feb 7 14:30:23
Feb 7 14:40:15 h1307630 postfix/anvil[6115]: statistics: max cache size 3 at Feb 7 14:30:32
Feb 7 14:40:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:40:56 h1307630 last message repeated 4 times
Feb 7 14:41:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:41:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:41:56 h1307630 last message repeated 4 times
Feb 7 14:42:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:42:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:42:42 h1307630 last message repeated 3 times
Feb 7 14:42:44 h1307630 courierpop3login: fork: Cannot allocate memory
Feb 7 14:42:56 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:43:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:43:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling
Feb 7 14:43:56 h1307630 last message repeated 4 times
Feb 7 14:44:02 h1307630 postfix/qmgr[5822]: warning: connect to transport amavis: No such file or directory
Feb 7 14:44:17 h1307630 postfix/master[5820]: warning: master_spawn: fork: Cannot allocate memory -- throttling

Wie kann ich nun feststellen, warum hier kein Speicher mehr vorhanden ist ?
Diese Abstürze habe ich öfter und ich konnte bisher nicht feststellen, welche Anwendung hier den Speicher vollmacht....
02-08-2008 07:14 AM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: fail2ban und iptables
"Cannot allocate memory" -oh, ich kenne da jemanden im Forum, die kennt diese Meldung gut...:-)

Vielleicht erzählst du etwas über dein System...

Gruss J
02-08-2008 07:17 AM
Visit this user's website Find all posts by this user
vbbaby Offline
Junior Member
*

Posts: 58
Joined: Jun 2007
Reputation: 0
Post: #6
RE: fail2ban und iptables
Ich habe einen Vserver mit mit garantierten 256 MB Ram und bis zu 700 MB Ram dynamisch....Sad
02-08-2008 08:14 AM
Find all posts by this user
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #7
RE: fail2ban und iptables
Poste mal die Ausgabe von:
Code:
cat /proc/user_beancounters
02-08-2008 08:16 AM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #8
RE: fail2ban und iptables
vbbaby Wrote:Ich habe einen Vserver

dacht ich mir doch...

vbbaby Wrote:mit mit garantierten 256 MB Ram und bis zu 700 MB Ram dynamisch....Sad

also 256MB Ram ist ja nicht gerade viel für einen Hostingserver.

Bei der genannten Anwenderin (auch V-Server, jedoch 4GB Ram) vermute ich eher falsche Einstellungen oder defekter Ram.

Also: bei V-Zeugs kann ich nicht helfen - da gibt's andere hier im Forum...

/J
02-08-2008 08:18 AM
Visit this user's website Find all posts by this user
vbbaby Offline
Junior Member
*

Posts: 58
Joined: Jun 2007
Reputation: 0
Post: #9
RE: fail2ban und iptables
Quote:cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
1307630: kmemsize 6751810 6780585 8512433 9823665 8794446
lockedpages 0 2 3800 4096 0
privvmpages 87531 87822 138256 202568 0
shmpages 1978 1978 131072 131072 0
dummy 0 0 0 0 0
numproc 95 95 232 232 0
physpages 37199 37420 0 2147483647 0
vmguarpages 0 0 66400 2147483647 0
oomguarpages 37199 37420 66400 2147483647 0
numtcpsock 26 29 500 500 0
numflock 15 17 200 232 0
numpty 5 6 64 64 0
numsiginfo 0 3 512 512 0
tcpsndbuf 301860 346936 4683256 6102456 0
tcprcvbuf 425984 516472 4683256 6102456 0
othersockbuf 186492 371684 1503232 4063232 0
dgramrcvbuf 0 1212 240000 262144 0
numothersock 130 136 382 382 0
dcachesize 0 0 2194304 2317184 0
numfile 3341 3341 5432 5432 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 29 29 128 128 0
[/quote
]
02-08-2008 08:18 AM
Find all posts by this user
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #10
RE: fail2ban und iptables
Bei dir wird die kmemsize überschritten, diese zu drücken ist sehr schwierig.
Ist das ein Strato vPowerServer A?
02-08-2008 08:22 AM
Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)