Easy way to block IP address

Discussion in 'Installation/Configuration' started by pecka33, Apr 8, 2021.

  1. pecka33

    pecka33 Member

    Hi,

    is here any easy way how can i block specify IP address in firewall via ISP config? Or i should use something like that?

    Code:
    /sbin/route add -host IP address reject
    
    Thanks
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the firewall settings in ispconfig are only for ports you want to open.

    you could add the rule to ufw on the relevant server directly eg:
    Code:
    sudo ufw reject from 213.54.15.127 to any
    sudo ufw deny from 213.54.15.127 to any
    
    the reject rule will send a rejection message back to the source.
    the deny rule will not send anything at all back to the source.

    or you could create a blacklist for fail2ban on each server: Blacklist IP's from a file [Unix Server Tech Knowledge Base]
     
    Taleman likes this.

Share This Page