How to restrict the admin panel to your IP addresses
On this page
With an access list, only the addresses you name can open the admin panel (port 2087). Everyone else gets an error page, even with the right password.
Before you start
- You need addresses that do not change: your office, a VPN, or a fixed home connection.
- Make sure you can log in to the server as root over SSH (or through your provider's console), in case you need the recovery command.
Steps
- In the administrator panel (
https://<server>:2087), open Brute Force Protection (section Security). - Scroll to Admin panel access by IP. The card shows Your current IP.
- Enter the allowed addresses or ranges, separated by commas, for example
203.0.113.7, 198.51.100.0/24. IPv6 works too. - Click Save access list.
A list that does not contain your current address is refused: "Your current IP (…) is not in the list — you would lock yourself out." To remove the restriction, empty the field and save.
Who is affected
- Everyone who uses the admin panel: administrators and resellers. Give your resellers' addresses too, or they lose access.
- Administrators and resellers signing in elsewhere: their logins on the control panel login page and their API tokens are checked against the same list.
- Customers are not affected: their control panel, webmail and API tokens keep working from anywhere.
If you lock yourself out
Log in to the server as root (SSH or your provider's console) and run:
sahaab admin:allow-ip clear
This removes the list, so the admin panel opens from everywhere again. To add only your new address instead:
sahaab admin:allow-ip 203.0.113.7
Then sign in and correct the list.
Good to know
- Billing systems that use an administrator or reseller API token must connect from an address in the list.
- This list is about the admin panel only. To block or allow addresses for the whole server, use the Firewall page.
- Combine it with two-factor authentication, so a stolen password is not enough even from an allowed address.
Common questions
My internet address changed and the admin panel shows an error page.
Your new address is not in the list. Run sahaab admin:allow-ip <your new IP> on the server, or sahaab admin:allow-ip clear.
Can I allow a whole range?
Yes, in CIDR form, for example 198.51.100.0/24 or 2001:db8::/48.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to set up brute force protection for panel logins
Block IP addresses after repeated failed logins to the admin panel, control panel and API: set max failures, the time window, block time and whitelisted IPs.
- How to enable two-factor authentication (2FA) for your login
Protect your admin panel or control panel login with a 6-digit code from an authenticator app, save your 10 recovery codes, and sign in with 2FA.
- How to unblock an IP address (customer can't connect)
A customer or you cannot reach the server or log in: find which protection blocked the IP address and unblock it in the right place in the admin panel.
- How to restrict an API token (IP addresses, expiry, read-only)
Make API tokens safer: allow them only from certain IP addresses, let them expire after 7–365 days, or make them read-only. For admins, resellers, customers.