Skip to content

create_honeypot

Add a honeypot trap to a network.

Side effects:

  • Reads the current ips setting, appends a new entry {"network_id": ..., "ip_address": ..., "version": "v4"}, and writes the updated list back via POST /set/setting/ips.
  • Sets honeypot_enabled=true on the controller (the toggle tracks list non-emptiness).
  • Mutates controller state. Use dry_run=True to preview.

Refuses to write if the (network_id, ip) pair is already a honeypot or if ip is not a valid LAN IPv4 address.

create_honeypot(network_id="65f...", ip="10.0.50.2")
ParameterTypeRequiredDefaultDescription
network_idstringyesThe _id from list_networks for the VLAN the honeypot should live on.
ipstringyesUnallocated IPv4 address inside the target network.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it.