Skip to content

Releases: jcl06/netbox_geoip

NetBox GeoIP v1.1

Choose a tag to compare

@jcl06 jcl06 released this 07 Nov 09:34

🚀 NetBox GeoIP Plugin v1.1

Release Date: November 2025
Requires: NetBox ≥ 4.1.3 • Python ≥ 3.10


✨ Enhancement

  • 🧩 Direct Integration (No Custom Fields)
    GeoIP fields (Enable GeoIP, Country, Region, City) are now injected directly into NetBox’s native Prefix and IPAddress forms — no more extras.CustomField dependencies.

  • 🌍 Dynamic Region Filtering
    Region choices now auto-filter by selected Country using NetBox’s dynamic form logic.

  • 🕒 Changelog Synchronization
    GeoIP changes are now logged together with their parent Prefix/IP object for complete traceability.

  • 🧹 Safer, Self-Contained Plugin
    Removed legacy migrations that edited NetBox core files (ipam/urls.py) or created custom fields.
    The plugin now operates entirely through dynamic form patching and runs without any NetBox core modifications.

  • 🗑️ Auto-Delete Behavior
    Disabling Enable GeoIP automatically deletes the related GeoIP record.


⚠️ Upgrade Notes

If upgrading from v1.0:

  1. Remove old custom fields (country, region, city, geoip_feed) from Customization → Custom Fields.

  2. Uncomment and remove the following in ipam.urls.py:

    - from netbox_geoip import views as netbox_geoip_views  # remove from the top
    
    # Prefixes
    ...
    + path('prefixes/add/', views.PrefixEditView.as_view(), name='prefix_add'),
    - # path('prefixes/add/', views.PrefixEditView.as_view(), name='prefix_add'),
    - path('prefixes/add/', netbox_geoip_views.CustomPrefixAddView.as_view(), name='prefix_add'),
    ...
    + path('prefixes/edit/', views.PrefixBulkEditView.as_view(), name='prefix_bulk_edit'),
    - # path('prefixes/edit/', views.PrefixBulkEditView.as_view(), name='prefix_bulk_edit'),
    - path('prefixes/edit/', netbox_geoip_views.CustomPrefixBulkEditView.as_view(), name='prefix_bulk_edit'),
    ...
    - path('prefixes/<int:pk>/edit/', netbox_geoip_views.CustomPrefixEditView.as_view(), name='prefix_edit'),
    
    # IP addresses
    ...
    + path('ip-addresses/add/', views.IPAddressEditView.as_view(), name='ipaddress_add'),
    - # path('ip-addresses/add/', views.IPAddressEditView.as_view(), name='ipaddress_add'),
    - path('ip-addresses/add/', netbox_geoip_views.CustomIPAddressAddView.as_view(), name='ipaddress_add'),
    ...
    + path('ip-addresses/edit/', views.IPAddressBulkEditView.as_view(), name='ipaddress_bulk_edit'),
    - # path('ip-addresses/edit/', views.IPAddressBulkEditView.as_view(), name='ipaddress_bulk_edit'),
    - path('ip-addresses/edit/', netbox_geoip_views.CustomIPAddressBulkEditView.as_view(), name='ipaddress_bulk_edit'),
    ...
    - path('ip-addresses/<int:pk>/edit/', netbox_geoip_views.CustomIPAddressEditView.as_view(), name='ipaddress_edit'),
  3. Run plugin migrations:

    python manage.py migrate netbox_geoip

NetBox GeoIP v1.0

Choose a tag to compare

@jcl06 jcl06 released this 07 Nov 08:01

🧭 NetBox GeoIP Plugin — v1.0

⚙️ Requirements

Release Date: February 2025
Requires: NetBox 4.0.5 - 4.1.3 • Python ≥ 3.10


🎉 Initial Release

The first public release of the NetBox GeoIP Plugin, providing IP geolocation data management directly within NetBox.

✨ Key Features

  • GeoIP Data Model

    • Store and manage geolocation metadata for IP Addresses and Prefixes.
    • Includes fields for:
      • Country
      • Region
      • Subdivision Code
      • City
      • Subnet
      • Status
  • Integration with NetBox Custom Fields

    • Adds four custom fields to IP Addresses and Prefixes:
      • geoip_feed – Enable or disable GeoIP for the object.
      • country – Linked to Country model.
      • region – Linked to Region model.
      • city – Text field for specifying the city name.
    • Automatically groups these under a "GeoIP Info" section.
  • Built-in Country and Region Data

    • Preloaded CSV data for all ISO country and region codes.
    • Data automatically imported during migration.
  • Dynamic Region Filtering

    • When selecting a country, the Region dropdown dynamically filters available regions.
  • Automatic Field Creation

    • Migration 0004_create_custom_fields.py automatically creates GeoIP-related custom fields in NetBox.
  • IPAM URL Integration

    • Migration 0005_update_ipam_urls.py automatically edit ipam.urls.py.
    • This is to extend NetBox’s Prefix and IPAddress add/edit pages to include GeoIP fields to have Dynamic Region Filtering.
      + from netbox_geoip import views as netbox_geoip_views  # added on the top
      
      # Prefixes
      ...
      + # path('prefixes/add/', views.PrefixEditView.as_view(), name='prefix_add'),
      + path('prefixes/add/', netbox_geoip_views.CustomPrefixAddView.as_view(), name='prefix_add'),
      ...
      + # path('prefixes/edit/', views.PrefixBulkEditView.as_view(), name='prefix_bulk_edit'),
      + path('prefixes/edit/', netbox_geoip_views.CustomPrefixBulkEditView.as_view(), name='prefix_bulk_edit'),
      ...
      
      # IP addresses
      ...
      + # path('ip-addresses/add/', views.IPAddressEditView.as_view(), name='ipaddress_add'),
      + path('ip-addresses/add/', netbox_geoip_views.CustomIPAddressAddView.as_view(), name='ipaddress_add'),
      ...
      + # path('ip-addresses/edit/', views.IPAddressBulkEditView.as_view(), name='ipaddress_bulk_edit'),
      + path('ip-addresses/edit/', netbox_geoip_views.CustomIPAddressBulkEditView.as_view(), name='ipaddress_bulk_edit'),

💻 Installation

NetBox Configuration

Add the plugin to the NetBox config. ~/netbox/configuration.py

PLUGINS = ["netbox_geoip"]

Installation

$ source /opt/netbox/venv/bin/activate
(venv) $ pip install /path/netbox-geoip

To add the netbox_geoip tables to NetBox database:

(venv) $ python manage.py migrate netbox_geoip