Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Postfix
(view source)
Revision as of 05:04, 24 November 2017
357 bytes added
,
05:04, 24 November 2017
no edit summary
Line 1:
Line 1:
−
Limit incoming Mail Rate against Spam Scripts
:
+
==
Limit incoming Mail Rate against Spam Scripts
==
edit main.cf and set:
edit main.cf and set:
Line 17:
Line 17:
Result: after 10Mails the sending IP should by blocked!
Result: after 10Mails the sending IP should by blocked!
Add "fail2ban" Log Monitor as second wall protection to kick out bad IP's forever!
Add "fail2ban" Log Monitor as second wall protection to kick out bad IP's forever!
+
+
+
== Automatic Firewall Update ==
+
+
edit a Script firewall.sh set:
+
<pre>
+
#!/bin/bash
+
# GET BAD IP'S
+
cat /var/log/mail.log | grep rejected | cut -d"[" -f3 | cut -d"]" -f1 > /tmp/firewall.txt
+
# insert to Firewall
+
while read line; do sudo ufw insert 1 deny from $line to any; done < /tmp/firewall.txt
+
service ufw restart
+
exit 0
+
</pre>
+
run by cron hourly..
Author
Bureaucrats
,
Administrators
286
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Linux
Debian + Ubuntu
Apache Webserver
Openbox
SME server
Privoxy Tor
Postfix
Tinycore Linux
Tools
MySQL
MySQL
Wordpress
Customize
Unix
FreeBSD
Router OS
openwrt
pfsense
fritzbox
Netio Koukaam Wiki
netio-230a/b
Mediawiki
MediaWiki
Tools
Special pages
Printable version