Skip to main content

IP bans and the IP allow-list

MonoPbx protects itself from bad network neighbours in two ways. It bans addresses that misbehave, automatically, on the phone ports and on the web console and API. And you can limit who may reach the administration at all with the IP allow-list. This page shows how to see and lift bans, how to keep trusted addresses from ever being banned, how to restrict administrators to known networks, and how to avoid locking yourself out.

All of it is install-wide and is managed by system administrators. Under Settings > Security in the admin console you will find Blocked IPs and IP allow-list. Seeing them needs the permission to view system settings; changing them needs the permission to change system settings. Every change is recorded in the audit log.

Automatic bans​

One ban engine covers both sides. An address that keeps misbehaving is dropped without any answer for a while, and a banned address costs the server almost nothing.

  • On the phone side (SIP): too many failed sign-ins of phones, scanners, floods, and invalid requests. Details and the other SIP protections are in Geo blocking and SIP edge protection.
  • On the web side: wrong passwords, second factors or passkeys, invalid tokens and API keys, forged webhook signatures, probing for pages that do not exist, and floods of requests from one address.

A repeat offender is blocked for twice as long each time, up to a limit. Bans expire by themselves.

Changing the rules​

On Blocked IPs, the Ban settings card sets when and for how long addresses are blocked: the switch Block addresses automatically, the failures allowed before a block for SIP sign-ins, SIP floods, invalid requests, web sign-ins and web probes (each with its own time window), the First block and Longest block, and the memory for repeat offenders. Choose Save settings; changes apply within seconds, without a restart, and do not change blocks already in force. With the switch off, failures are still counted but nobody is blocked automatically, and you can still block by hand.

See a ban and lift it​

Open Security, Blocked IPs, tab Blocked IPs. The table shows each blocked Address, the Reason (Failed sign-ins, Flooding, Invalid requests, Scanner or Added by an administrator), the Source (SIP, console sign-in, API, webhooks or manual), Failures, First seen, Last seen, how many requests were Dropped, the Country and when the block Expires. Search by address, reason, edge or country, and filter by source.

A block or an unban applies on every PBX server within a moment.

  • To lift one ban, choose Unban on its row.
  • To lift several, tick them and choose Unban selected.

If the shared store cannot confirm an unban the page says how many failed and asks you to try again.

To block an address yourself, use Block an address: enter the IP address and a Duration (1 minute to 30 days). An address on the allow list or belonging to a trunk cannot be blocked. If you enter the address you are using now, the page asks you to tick a confirmation first.

At the bottom, Block history lists who or what was blocked or unbanned, why, and by whom, newest first, for 90 days.

Trusted addresses​

On the tab Allowed IPs, an address or network such as an office, a monitoring system or a provider is never counted, blocked or rate limited, on the phone ports and on the web console alike. Add an address with Allow (with an optional Note) or Allow my current address; remove it with Remove.

  • The addresses of your enabled trunk providers and your trusted proxies are added automatically and marked "Added automatically".
  • The option Never block trunk provider addresses in the ban settings keeps providers from being locked out by mistake.
  • An allowed address cannot be blocked by hand or automatically: remove it from the list first.

The administrator allow-list​

Security, IP allow-list limits who can reach the administration of the PBX. A request from any other address is refused before sign-in and reveals nothing about users or tokens (error MPBX-NET-ADMIN-IP-DENIED). It is off by default.

  1. Under Allowed addresses enter one address or CIDR block per line, IPv4 or IPv6 (up to 64).
  2. Choose what it Applies to: Install-wide administration only, or The whole API, including the apps. Choose the second only when everyone, including phones and apps, comes from known networks or a VPN.
  3. Switch on Enforce the allow-list and choose Save.

The page shows Your address, as the PBX sees it, and Add my address puts it in the list. This is not the same as the Allowed IPs tab above: that one only spares addresses from bans, while the administrator allow-list refuses everyone else.

Behind a reverse proxy​

Both features judge the address the PBX sees. Behind a proxy that is not configured as trusted, every visitor looks like the proxy. Set your trusted proxies as described in Behind a reverse proxy before you rely on bans or the allow-list.

Avoid locking yourself out​

  • Save a list that excludes your own address and the console refuses it (MPBX-NET-ALLOWLIST-LOCKOUT). Use Add my address first.
  • Blocking your own address needs an explicit confirmation. Prefer Allow my current address on the Allowed IPs tab so that failed sign-ins from your office never ban you.
  • Connections from the PBX host itself (loopback) are always allowed, so the owner of the install can correct a mistaken list from the server.
  • A VPN or a mobile network may change your address. Keep a second trusted network in the list, or reach the PBX through the VPN.
  • If you are banned, ask a colleague on an allowed address to open Blocked IPs and choose Unban, or wait for the block to expire.

For country-based rules see Geo blocking and SIP edge protection; for the other protections see Security and network access.