Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/netbox-ripe-updater/llms.txt

Use this file to discover all available pages before exploring further.

Before Netbox RIPE Updater can synchronize prefix data with RIPE-DB, NetBox must be configured with a set of custom fields that carry RIPE-specific metadata, a region hierarchy that maps sites to ISO 3166-1 country codes, and a webhook that fires on every prefix create, update, or delete event. Without these three pieces in place the updater has no way to determine which prefixes should be reported, which RIPE template to apply, or which country to associate with an object.

Custom fields

Four custom fields are required. Add them under Customization → Custom Fields in the NetBox admin interface.

lir — Local Internet Registry

PropertyValue
Namelir
LabelLIR
Assigned modelsIPAM → Aggregates
TypeSelection
RequiredYes
ChoicesOne entry per LIR you are responsible for
DescriptionRIPE Local Internet Registry
This field is set on aggregate objects (not individual prefixes) and tells the updater which LIR owns the address block. The value must match a key in your lir_org.json template file.

ripe_report — RIPE reporting flag

PropertyValue
Nameripe_report
LabelRIPE Report
Assigned modelsIPAM → Prefixes
TypeBoolean
RequiredNo
Defaultfalse
DescriptionShould this prefix be in RIPE-DB
Set this field to true on any prefix you want the updater to create or maintain in RIPE-DB. Prefixes with this field absent or set to false are ignored.

ripe_template — Template selector

PropertyValue
Nameripe_template
LabelRIPE Template
Assigned modelsIPAM → Prefixes
TypeSelection
RequiredNo
ChoicesOne entry per template defined in templates.json
This field links a prefix to a specific template from your templates.json file. The value must exactly match a key in that file (e.g. CLOUD-POOL or CUST-ACCESS-NET).

ripe_netname — RIPE netname override

PropertyValue
Nameripe_netname
LabelRIPE Netname
Assigned modelsIPAM → Prefixes
TypeString
RequiredNo
When set, this value is used as the netname attribute on the INETNUM or INET6NUM object instead of the automatically derived value.

Region setup

The updater derives the two-letter country code from the slug of a site’s parent region. For example, a region with slug gb maps to the United Kingdom. Ensure your country regions use lowercase ISO 3166-1 alpha-2 slugs (e.g. de, nl, gb).
Sites in NetBox must be associated with a parent region whose slug corresponds to a country code from the python-iso3166 library. The updater traverses the region hierarchy upward from a prefix’s site until it finds a matching country code. If no match is found, it falls back to the DEFAULT_COUNTRY value set in .env.updater.
1

Create country regions

In NetBox, go to Organization → Regions and create a region for each country you operate in. Set the slug to the lowercase ISO 3166-1 alpha-2 code for that country (e.g. gb for the United Kingdom, de for Germany, nl for the Netherlands).
2

Assign sites to country regions

For each site, set its Region (or a parent region in the hierarchy) to the appropriate country region. The updater walks up the region tree, so sites can be nested under city or campus regions as long as a country region appears as an ancestor.

Webhook

The webhook tells NetBox to notify the updater whenever a prefix is created, updated, or deleted.
1

Open webhook configuration

In NetBox, go to Integrations → Webhooks and click Add.
2

Set general options

Fill in the following fields:
FieldValue
Nameripe-updater
EnabledYes
3

Configure events

Under Events, enable all three triggers:
  • Create
  • Update
  • Delete
4

Set HTTP request options

FieldValue
HTTP methodPOST
Payload URLhttp(s)://your-ripe-updater-host/update
HTTP content typeapplication/json
5

Assign models

Under Assigned models, select IPAM → Prefix. The webhook fires only for prefix objects.
6

Add the authorization header

If you have set UPDATE_TOKEN in .env.updater, add a matching header under Additional headers:
Authorisation: Token YOURTOKEN
Replace YOURTOKEN with the exact value you set for UPDATE_TOKEN. The updater rejects any webhook request that does not carry this header when the token is configured.
7

Configure SSL verification

Enable SSL verification if your updater endpoint is served over HTTPS with a valid certificate. For production deployments it is strongly recommended to place a reverse proxy such as Nginx in front of the updater and terminate TLS there.

Environment variables

Review all application and Docker Compose variables.

Templates

Define RIPE object attributes using the JSON template system.

Build docs developers (and LLMs) love