1
爲什麼以下fail2ban regex
爲什麼的fail2ban不匹配腳本沒有找到
failregex = ^%(_apache_error_client)s ((AH001(28|30):)?File does not exist|(AH01264:)?script not found or unable to stat).*$
^%(_apache_error_client)s script '.*' not found or unable to stat
不匹配
[client 111.111.111.111:51008] script '/srv/www/htdocs/wwwuni/fileadmin/Dokumente/index.php' not found or unable to stat
failregex是兩行;第二行在stat之後開始),$ –
也許你是否錯過了第二行的'stat'之後的$? – OscarAkaElvis
缺少的$不是問題。問題在於_apache_error_client的定義與 不一致 _apache_error_client = \ [[^]] * \] \ [(錯誤| \ S +:\ S +)\](\ [pid \ d +] )? \ [客戶端(:\ d {1,5})?\] 至 _apache_error_client = \ [[^]] * \] \ [(:error | \ S +:\ S +)\](\ [pid \ d +])? \ [客戶端(:\ d {1,5})?\] (:在錯誤前面) –