Skip to main content

Module command

Module command 

Source
Expand description

CLI command implementations that communicate with the natmap daemon.

Each handle_* function constructs the appropriate HTTP request to the daemon’s Unix socket API and formats the response for display.

Functions§

add
Adds a new port mapping via the daemon API.
handle_clear
Sends a clear-all request to the daemon, removing all managed rules and resetting state.
handle_dnat
Adds or removes a static DNAT rule via the daemon API.
handle_hairpin
Adds or removes a static hairpin NAT rule via the daemon API.
handle_list
Displays a combined listing of static iptables NAT rules and daemon-managed state.
handle_snat
Adds or removes a static SNAT rule via the daemon API.
list
Lists Docker port mappings from the daemon (active mappings only).
remap
Remaps a container’s host port to a new port without restarting the container.
remove
Removes one or more Docker port mappings via the daemon API.
try_list
Lists Docker mappings, silently returning a message when the daemon is not reachable.