Firewall and fail2ban in ISPmanager
Firewall
"Navigation board" → "Firewall". The list shows rules created in the panel. Rules added manually to iptables are not shown here.

- Click "Create rule".
- Choose the action (allow or deny), protocol, port and source address.
- Click "Create".

Example: open MySQL (3306) only for your IP — an allow rule, port 3306, source — your IP. Then a deny rule for port 3306 from any address.
Country blocking
"Country blocking" closes access from IP addresses of the selected countries. First choose the IP database in its settings.

fail2ban: protection against password guessing
"Navigation board" → "Network services". "Fail2ban rules" — which services are protected (SSH, panel, email, FTP). "Fail2ban settings" — how many attempts and for how long to block. Put your IPs in the "never ban" field.


Which ports are needed
| Port | Purpose |
|---|---|
| 1500 | ISPmanager panel |
| 1501 | external panel applications (phpMyAdmin, webmail from the panel) |
| 22 | SSH |
| 80, 443 | sites |
| 25, 465, 587, 110, 143, 993, 995 | |
| 21 | FTP |
| 53 | DNS |
Do not close 1500 and 22 for all addresses until you have added a rule for your IP. Lost access — open the VPS VNC console in the client area.