Blacklist ip address

Discussion in 'Server Operation' started by jimbo4215, Mar 25, 2019.

  1. jimbo4215

    jimbo4215 New Member

    Hello,
    what is the best way to black list lot of ip addresses and do persistent after a reboot ?
    I receive lot of spam attack.
    at this time I used :

    iptables -I INPUT -s 2.188.160.0/22 -p tcp --dport 25 -j DROP

    but it could be more aggressive and ban for everything and every time

    regards
     
  2. ruliezz

    ruliezz Member

    Your commando is good, your actions is only active in run time. To save your chances run:
    Code:
    iptables-save
    But there a better ways to block spam, for example: https://spamassassin.apache.org/
    If its for SSH abuse: install fail2ban.
     

Share This Page