Update network localities
You can add multiple CIDR blocks and IP addresses to a single network locality, and you can configure a name for the locality. The ExtraHop GitHub repository contains Python scripts that help you consolidate and rename localities automatically.
Note: | If you created network localities in firmware previous to version 9.0, where you could only specify a single CIDR block or IP address for a network locality, you might want to consolidate and rename network localities to make searching and filtering by locality easier. |
The retrieve_network_localities.py script retrieves all network locality information from a specified sensor or console and saves the information to a CSV file. You can modify the CSV file to specify which localities you want to consolidate and specify new names for existing localities. The create_network_localities.py script then reads the updated CSV file to replace the existing localities on a specified sensor or console.
Warning: | The create_network_localities.py script deletes all network localities on the target sensor or console before creating the new entries specified in the CSV file. |
Consolidating network localities
In the CSV file, you can specify which localities you want to consolidate by assigning the same description to multiple localities. When the create_network_localities.py script consolidates the localities, it assigns the name of the first locality in the group to the new locality. For example, assume that the CSV file contains the following entries:
networks | external | description | name |
---|---|---|---|
192.168.1.2 | False | group1 | [auto]: Internal - 192.168.1.2 |
192.168.1.1 | False | group1 | [auto]: Internal - 192.168.1.1 |
Running the create_network_localities.py script creates the following network locality on the target sensor or console:
networks | external | description | name |
---|---|---|---|
192.168.1.2 and 192.168.1.1 | False | group1 | [auto]: Internal - 192.168.1.2 |
To consolidate network localities with the same description in the CSV file as described in this topic, you must specify the --group description option when you run the create_network_localities.py script.
Renaming network localities
In the CSV file, you can specify descriptive names for localities. The ExtraHop system automatically generates names for network localities if they are not specified by a user.
Note: | If you run the retrieve_network_localities.py script on a sensor or console running firmware version 8.9 or earlier, the script automatically generates names for each locality and adds them to the CSV file. You can change these names to be more descriptive by changing the names in the CSV file before running the create_network_localities.py script. |
Both the script and the ExtraHop system generate names according to the following format:
[auto]: EXTERNALITY - NETWORK
In the above text, EXTERNALITY is replaced with either "External" or "Internal", and NETWORK is replaced with the IP address or CIDR block of the network. For example, the following name is assigned to a network locality for the 192.168.1.0/24 CIDR block:
[auto]: Internal - 192.168.1.0/24
Thank you for your feedback. Can we contact you to ask follow up questions?