Subnet Form
The Subnet form creates a new subnet or edits an existing one. A subnet defines an IPv4 or IPv6 network range in CIDR notation that scanners will probe. Subnets are the most direct target type — they bypass the discovery flow.
Inputs
| Name | Description | Allowed values | Default |
|---|---|---|---|
Name | Human-readable label for this subnet | Non-empty string, must be unique across subnets | — |
CIDR | IPv4 or IPv6 network range in CIDR notation | Valid CIDR (e.g. 192.168.1.0/24, 10.0.0.0/8, fd00::/64). Both v4 and v6 supported. | — |
Description | Optional free-text note (location, owner, sensitivity) | Any text, max 10,000 characters | Empty |
Gotchas
- **When creating:** The form uses Zod validation via `useFormSubmit` — invalid CIDR strings produce a field-level error rather than a vague "Save failed" message. Specifically: malformed prefix length (/33 for IPv4, /129 for IPv6) and unparseable host bits both fail validation.
- **When editing:** Changing the CIDR retroactively affects FUTURE scans only — past scan results remain read-only for audit integrity. If you need a different range, prefer creating a new subnet rather than mutating an existing one.
- Each subnet must have at least one scanner ASSIGNED to it before it can actually be scanned. Assignment is done on the subnet detail page (click the subnet name in the list), not in this form. A subnet with zero scanner assignments is silently skipped at scan time.
- Subnet rate limits and scanner-binding settings are managed elsewhere — this form covers the identity and CIDR only. Rate-limiting lives on the parent list page (inline-editable Rate Limit column).
- Subnets referenced by a Subnet Group OR a Scan Template cannot be deleted from the parent list page — remove the references first.
API calls (3)
| Method | Path | Description |
|---|---|---|
| GET | /api/config/subnets/:id | Load an existing subnet (Edit mode) |
| POST | /api/config/subnets | Create a new subnet (Create mode) |
| PUT | /api/config/subnets/:id | Update an existing subnet (Edit mode) |
Related
- Subnets — Parent list page — also describes scanner assignment, rate limiting, and the subnet detail view
- Subnet Groups — Bundle subnets for use in scan templates
- Scan Templates — Consumes subnets (or subnet groups) to define what gets scanned
- Discovery — Alternative to subnets — pull IPs dynamically from external sources