Skip to content

Setup and Configuration Guide

LoH-lu edited this page Dec 30, 2024 · 1 revision

Requirements

  • requirements.txt

Contains all the necessary Python imports for the project.

  • Python Version

Minimum tested version: Python 3.12.6. The script works on both Windows and Linux (both OSes have been tested successfully).

  • Nmap

Nmap needs to be installed on your system (works on both Windows and Linux).

  • Server Setup

It is recommended to run the script on a server separate from your NetBox instance. The server will need full access to your network or at least PING and DNS access.

Configuration

  • var.ini

In this file, specify: Your NetBox URL (e.g., http(s)://x.x.x.x/ or http(s)://netbox.domain/). Your API token generated from NetBox. Configuration options such as enabling DNS resolution, adding the last scan time, and showing progress during the execution of netbox_import.py.

  • Main Script

Use main.py to run the full process.

  • Cronjob Setup

Ensure your cron job (or its equivalent) waits for the preceding script to finish before starting the next one.

NetBox Configuration

  • Create Tags

In your NetBox instance: Create the tag Disable Automatic Scanning. image Create the tag autoscan. This will help you identify which IP addresses were added by the script. image

  • Custom Fields (Optional)

You can create a custom field called scantime under Customization. This will allow you to quickly see when an IP address was last reachable. image image image

Clone this wiki locally