Skip to content

Public IPs

The Public IPs page manages the public IPv4/IPv6 addresses your ISP hands out to subscribers. You define pools (a CIDR range with an optional monthly price), then create assignments that bind a single IP from a pool to a subscriber. Assigning an IP writes a Framed-IP-Address (or Framed-IPv6-Prefix) entry into radreply and disconnects the subscriber via CoA so they reconnect onto the new address.

Customers can also buy and release their own public IP from the self-service portal, charged against their wallet balance — see Customer self-service below.

Sidebar → Public IPs. The page has two tabs: IP Pools and Assignments.

Viewing the page requires public_ips.view. Creating pools, assigning, reserving, and releasing all require public_ips.manage — without it the page is read-only (no Add Pool / Assign / Reserve / Release buttons, no pool edit/delete icons).

The page is a header (with a Refresh button) plus two tabs.

ColumnWhat it shows
NamePool name.
CIDRThe range as entered (e.g. 203.0.113.0/24).
VersionIPv4 or IPv6 badge, auto-detected from the CIDR.
GatewayOptional gateway address (skipped during allocation).
Price/moMonthly price, or “Free” when 0.
UsageA bar plus used/total count (used = active + reserved assignments).
StatusActive or Inactive.
ActionsEdit / Delete (only with public_ips.manage).

Each pool’s Total IPs is computed from the prefix size minus the network and broadcast addresses. Used IPs is recalculated on every list load as the count of assignments in that pool with status active or reserved.

A filter bar (Pool dropdown, Status dropdown, IP search) plus the assignment table.

ColumnWhat it shows
IP AddressThe assigned address. Bandwidth-customer IPs are grouped into a single consolidated row showing all their IPs with an “N IPs” badge.
CustomerThe subscriber username, or a bandwidth-customer name (shown in purple) for grouped rows.
PoolSource pool name.
VersionIPv4 / IPv6.
Statusactive, released, suspended, or reserved.
Price/moThe price recorded on the assignment, or “Free”.
AssignedWhen the IP was assigned.
Next BillingNext billing date (populated for portal purchases).
ActionsRelease (or Release All for a grouped bandwidth-customer row), only with public_ips.manage.

The Status filter offers Active, Released, Suspended, and Reserved. The search box matches on IP address. The list is server-side paginated at 25 rows per page.

  1. On the IP Pools tab, click Add Pool.
  2. Enter a Name (required) and a CIDR (required), e.g. 203.0.113.0/24 for IPv4 or 2001:db8::/48 for IPv6.
  3. Optionally set a Gateway, a Monthly Price (0 = free), and a Description.
  4. Leave Active checked so the pool can be assigned from.
  5. Click Save.

The CIDR is validated and the IP version is detected automatically on save. The CIDR is stored exactly as entered — the address you type before the / is treated as the start of the range. For example, with 198.51.100.50/27 allocation runs from .9 through .38, not from the normalized .0 network address.

Click the trash icon on a pool row. A pool with active assignments cannot be deleted — the server rejects it with a count of how many active assignments are blocking the delete. Release those assignments first.

  1. On the Assignments tab, click Assign IP.
  2. Choose a Pool (only active pools are listed, with their used/total count and price).
  3. Search for and select a Subscriber.
  4. Optionally enter a Specific IP — leave it empty to auto-allocate the next free address.
  5. Optionally add Notes, then click Assign IP.

What the server does on assign:

  1. Rejects the request if the subscriber already has an active public IP assignment (one active assignment per subscriber).
  2. Rejects it if the pool is inactive.
  3. If a specific IP was given, validates it is inside the pool’s CIDR and not already assigned. If left blank, auto-allocates the next available address.
  4. Creates the assignment with status active and increments the pool’s used count.
  5. Writes Framed-IP-Address (IPv4) or Framed-IPv6-Prefix (IPv6) to radreply for the subscriber’s username (deleting any existing entry of the same attribute first).
  6. Sends a CoA disconnect so the subscriber reconnects and picks up the new IP.

Allocation walks the pool range from the entered start address, skipping the first and last address in the range, the configured gateway, any IP already active or reserved in the pool, and any IP already present in radreply as a Framed-IP-Address. The first address that passes all those checks is used. For IPv6 it scans up to the first 10,000 addresses in the prefix.

Use Reserve IP to take an address out of the allocation pool without giving it to a subscriber — for example an IP already in use on external hardware.

  1. On the Assignments tab, click Reserve IP.
  2. Select a Pool, enter the IP Address (must be inside the pool’s CIDR), and optional Notes.
  3. Click Reserve IP.

The server validates the IP is in the CIDR and not already assigned or reserved, then creates a reserved assignment (no subscriber, no radreply write, no CoA) and increments the pool’s used count. Reserved IPs are excluded from future auto-allocation.

Click Release on an assignment row (or Release All on a grouped bandwidth-customer row). Only active or reserved assignments can be released.

On release the server:

  1. Sets the assignment status to released and records released_at.
  2. Decrements the pool’s used count (floored at 0).
  3. If the assignment was active and tied to a subscriber, removes the Framed-IP-Address / Framed-IPv6-Prefix from radreply and sends a CoA disconnect so the subscriber reconnects without the public IP.

Releasing a reserved IP just frees it for allocation — no radreply or CoA action is taken.

Subscribers can manage their own public IP from the customer portal. These actions run as the logged-in subscriber:

ActionBehavior
ViewReturns the subscriber’s current active assignment (if any) plus the list of active pools, each annotated with available IP count (total − used).
BuyAllocates the next available IP from the chosen active pool. Blocked if the subscriber already has an active public IP. If the pool’s monthly price is greater than 0, the price is checked against and deducted from the subscriber’s wallet balance, a subscriber-purchase transaction is recorded, and last_billed_at / next_billing_at (now + 30 days) are set. Writes radreply and CoA-disconnects to apply.
ReleaseReleases the subscriber’s active assignment: sets status released, decrements the pool, removes the radreply entry, and CoA-disconnects.

A purchase with insufficient balance is rejected with the required vs available amount.

PermissionEffect
public_ips.viewLoads the page; lists pools and assignments; reads a subscriber’s public IP and a pool’s available IPs.
public_ips.manageCreate/edit/delete pools, assign, reserve, and release.

The customer-portal endpoints (view / buy / release) are gated by customer authentication, not these admin permissions.

  • Subscribers — assignments bind to a subscriber; a subscriber’s active public IP is also surfaced per-subscriber.
  • Subscriber Detail Page — where a single subscriber’s account, including their assigned IP, is managed.
  • Sessions — the assigned Framed-IP-Address shows up here as the subscriber’s session IP after they reconnect.
  • Services & Plans — services also drive RADIUS pool / Framed attributes for normal (non-public) IP allocation.
  • Billing & Invoices — portal purchases deduct from the subscriber wallet and record a transaction.