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_
policy_ route - Adds or removes a policy routing rule via the daemon API.
- 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.