- 07 Mar 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Windows DHCP Server
- Updated on 07 Mar 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Windows DHCP Server is a networking server used to lease IP addresses and manage other configuration information.
Types of Assets Fetched
This adapter fetches the following types of assets:
- Devices
Parameters
- Host Name or IP Address (required) - The hostname or IP address of the Windows DHCP server.
- User Name and Password (required) - The credentials for a domain user account that has the Required Permissions to execute PowerShell code which queries the Windows DHCP server for information on the systems managed by that server.
- Encoding (optional, default: utf8NoBom) - Select from the dropdown a custom encoding for the temporary JSON file created on the Windows DHCP server before it is downloaded to Axonius.
- For PowerShell versions 7 and above, select utf8NoBom.
- For PowerShell versions prior to version 7, select utf8.
- For PowerShell version 2, select ASCII.
If the encoding option of utf8NoBom is selected but you receive no data from the adapter fetch process, you might be using an older PowerShell version.
To resolve the issue, select utf8. The adapter fetch should operate as expected.
- For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.
Advanced Settings
From version 4.6, Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection, refer to Advanced Configuration for Adapters.
- Number of parallel connections (required, default: 20) Specify the maximum number of parallel connections permitted.
- Fetch Timeout Per Parallel Connection (seconds) (required, default: 300, min: 30). Specify the timeout for data to be returned from each parallel connection.
- CIDR Exclusion List - Enter a comma-separated list of IP addresses and CIDRs to exclude from the fetch.
- Fetch statistics - Select this option to fetch statistical information about the DHCP service.
For details on general advanced settings under the Adapter Configuration tab, see Adapter Advanced Settings.
Required Ports
- 135 (RPC)
- 445 (SMB)
- Random port in the range 1024-65535
Setting up a fixed port for WMI
The Windows DHCP Server adapter uses WMI.
You need to set up a fixed port to work with WMI.
WMI runs as part of a shared service host with ports assigned through DCOM by default. However, you can set up the WMI service to run as the only process in a separate host and specify a fixed port. For more details, see Microsoft Documentation - Setting Up a Fixed Port for WMI.
To set up a fixed port for WMI
- At the command prompt, type:
winmgmt -standalonehost
- Stop the WMI service by entering:
net stop "Windows Management Instrumentation"
or:
net stop winmgmt
- Restart the WMI service again in a new service host by entering:
net start "Windows Management Instrumentation"
or:
net start winmgmt
- Establish a new port number for the WMI service by typing (e.g. the following example will establish port TCP 24158):
netsh firewall add portopening TCP 24158 WMIFixedPort
To undo any changes you make to WMI, enter:
winmgmt /sharedhost
Then stop and start the winmgmt service again.
Required Permissions
The value supplied in User Name and Password must be able to execute PowerShell code which queries the Windows DHCP server for information on the systems managed by that server.
The supplied User Name must have the following permissions:
- Access RPC on the Windows DHCP server.
- Execute PowerShell on the Windows DHCP server and access the IPC$ share on the Windows DHCP server.
- Access ADMIN$ share on the Windows DHCP server (preferred permissions).