sendmail 遇到 DDoS

sendmail 遇到 DDoS 攻擊,只好將一些防護機制啟動囉~~~

以下是 /etc/mail/sendmail.mc 的語法,加在檔案最後面:

  • define(`LUSER_RELAY’,`local:anderson’)dnl

將 Mail Server 查無此人時,寄到指定的帳號『anderson』

  • define(`confMAX_MESSAGE_SIZE’,10240000)dnl

限制單一封 mail 最大 10MB

  • define(`confCONNECTION_RATE_THROTTLE’, 3)dnl

最大Client連線同時不可超過3個,避免 DDoS

  • define(`confMAX_RCPTS_PER_MESSAGE’,50)dnl

定義郵件最大收件者不可超過 50 位

最後,記得將 sendmail 服務重新啟動!

service sendmail restart

 

 

參考網址:

http://www.vixual.net/blog/archives/155

https://www.ptt.cc/bbs/FreeBSD/M.1114054326.A.html

http://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-zh_tw-4/s1-server-mail.html

本篇發表於 Bookmark, 網路, Linux, Secure資訊安全, VMware。將永久鏈結加入書籤。

發表留言