獨立SMTP寄信伺服器 + Auto Ban
iDempiere

獨立SMTP寄信伺服器 + Auto Ban

2019-04-14 · 2 分鐘 · Ray Lee (System Analyst)

自架伺服器,一定會遇到擾人的問題。有人不斷來試你的寄信主機,然後試出密碼後,借用你的寄信伺服器大量寄發垃圾郵件。
解決方案:利用 Mail Log 搭配 iptables 防火牆管理惡意入侵IP。

獨立SMTP寄信伺服器 + Auto Ban

可以自行開發或使用流通的解決方案。

自行開發:

檢查 /var/log/mail.log 登入失敗過多的IP,寫入IPTABLE DROP

使用社群套件:
https://help.ubuntu.com/community/Postfix

https://help.ubuntu.com/community/Fail2ban

English Version

When hosting your own server, you will inevitably encounter annoying issues. People constantly attempt to brute-force your mail server, and once they crack the password, they abuse your SMTP server to send massive amounts of spam.
Solution: Use Mail Log combined with iptables firewall to manage malicious intrusion IPs.

獨立SMTP寄信伺服器 + Auto Ban

You can develop your own solution or use existing community solutions.

Custom development:

Check /var/log/mail.log for IPs with excessive failed login attempts, and add them to IPTABLES DROP

Using community packages:
https://help.ubuntu.com/community/Postfix

https://help.ubuntu.com/community/Fail2ban

日本語版

自前でサーバーを運用していると、必ず厄介な問題に遭遇します。誰かが絶えずメールサーバーに対してブルートフォース攻撃を仕掛け、パスワードを突破した後、あなたのSMTPサーバーを悪用して大量のスパムメールを送信します。
解決策:メールログとiptablesファイアウォールを組み合わせて、悪意のある侵入IPを管理します。

獨立SMTP寄信伺服器 + Auto Ban

独自に開発するか、既存のコミュニティソリューションを使用できます。

独自開発:

/var/log/mail.log でログイン失敗が多すぎるIPを確認し、IPTABLES DROPに追加します

コミュニティパッケージの使用:
https://help.ubuntu.com/community/Postfix

https://help.ubuntu.com/community/Fail2ban

Ray Lee (System Analyst)
作者 Ray Lee (System Analyst)

iDempeire ERP Contributor, 經濟部中小企業處財務管理顧問 李寶瑞