MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • iptables

iptables

Administration tool for IPv4/IPv6 packet filtering and NAT

Block IP address

   1 cat /var/log/auth.log | grep Failed
   2 iptables -A INPUT -s 14.39.42.133 -j DROP
   3 iptables -A INPUT -s 80.94.95.181 -j DROP
   4 iptables -A INPUT -s 77.90.185.59  -j DROP
   5 iptables -L
   6 apt install whois
   7 whois 14.39.42.133 

firewall.sh

   1 iptables -F
   2 sh mail_failure_ip_list.sh | xargs -i iptables -A INPUT -s {} -j DROP
   3 iptables -L

mail_failure_ip_list.sh

   1 #!/bin/sh
   2 cat /var/log/mail.log | grep failure | awk '//{print $5}' | sort | uniq | sed 's/unknown//g' | sed 's/://g' | sed 's/\[//g' | sed 's/\]//g'
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01