0
我們正在嘗試設置Apache Mod Evasion以防止將來在我們的某臺服務器上發生DOS攻擊。除了電子郵件通知外,一切似乎都運作良好。該堆棧在Ubuntu Server 16.04上運行PHP 7.1和Apache2.4。Mod Evasion電子郵件通知問題
sudo su - www-data -s /bin/bash -c 'echo "this is the body" | mail -s "Subject" [email protected] [email protected]'
這裏是國防部evasion.conf:
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 1
DOSSiteCount 1
DOSPageInterval 10
DOSSiteInterval 10
DOSBlockingPeriod 10
DOSEmailNotify root
#DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
DOSLogDir "/var/log/mod_evasive"
</IfModule>
這裏是ssmtp.conf文件:
[email protected]
FromLineOverride=YES
Debug=YES
UseSTARTTLS=YES
UseTLS=YES
mailhub=email-smtp.us-east-1.amazonaws.com:465
AuthUser=#######
AuthPass=#######
AuthMethod=LOGIN
這裏
電子郵件通過測試命令工作正常是revaliases文件:
root:[email protected]:email-smtp.us-east-1.amazonaws.com:25
www-data:[email protected]:email-smtp.us-east-1.amazonaws.com:25