Articles in this section

How to add several IP addresses into whitelist Fail2ban via CLI?

Plesk for Linux

Question

How to add several IP addresses into whitelist Fail2ban via CLI?

What is correct syntax for the cli command to add multiple trusted IP addresses in one line?

Answer

  1. Connect to the server via SSH
  2. Run the following command to add 203.0.113.2, 203.0.113.3, 203.0.113.4 IP addresses:

    # plesk bin ip_ban --add-trusted "203.0.113.2;203.0.113.3;203.0.113.4"

IP addresses have to be separated by a ; symbol and surrounded by quotes.

Note: For a description, add: -description "reason for whitelisting"

Additional Information

How to whitelist an IP address in Plesk Fail2Ban

Was this article helpful?

Comments

8 comments
Date Votes
  • Is there a way to use this command and add a description as we can do by GUI ?

    2
  • Although it is undocumented on the web docs, there is the option to add

    -description "reason for whitelisting"

    to the command.

    1
  • Thx !

    0
  • Thank you Nico for answering the question, it was added to the article

    0
  • May I suggest updating the outdated documentation?

    0
  • Last version needs list of IPs divided by ;

    3
  • as said the list now requires an ‘;’ as seprator between ips

    0
  • Hi, thank you for the feedback. 
    The article was updated. 
    Currently, the delimiter should be a ; symbol. 

    1

Please sign in to leave a comment.