Document host_ipv4
+ host_ipv6
#21959
Labels
area/engine
Issue affects Docker engine/daemon
area/networking
Relates to anything around networking
Is this a docs issue?
Type of issue
I can't find what I'm looking for
Description
Neither of these appear to have public documentation, but the feature can be useful to discover:
host_ipv6
bridge option to SNAT IPv6 connections moby/moby#46724On a project I maintain, I've had several users reach out about deploying on hosts with multiple IP addresses and being stuck with which outbound IP is used via bridge networks. Recently one contributor shared this solution which I've verified external hosts receive connections from the configured host IP to route outbound traffic from the bridge through.
This was important for containers running mail servers where DNS checks are performed by the receiving party, notably important for rDNS.
NOTE: There is a section for a related setting
host_binding_ipv4
which handles inbound traffic for the default IP that published ports will bind to. That is also shown as a driver options example fordaemon.json
config.Location
https://docs.docker.com/engine/network/drivers/bridge
Suggestion
Add a section regarding outbound IP / SNAT for the bridge driver options
host_ipv4
(Docker >= 20.10) andhost_ipv6
(Docker >= v25).I could be mistaken regarding being bridge specific, as the options don't appear to be scoped to
bridge
likehost_binding_ipv4
is? (The driver option key iscom.docker.network.host_ipv4
)According to this comment it is apparently bridge specific. Further discussion seems to suggest it is planned to support other network drivers too.
The text was updated successfully, but these errors were encountered: