Description
Is this a docs issue?
- My issue is about the documentation content or website
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:
- Support for com.docker.network.host_ipv4 driver label moby/libnetwork#2454
- New
host_ipv6
bridge option to SNAT IPv6 connections moby/moby#46724
On 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 for daemon.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) and host_ipv6
(Docker >= v25).
I could be mistaken regarding being bridge specific, as the options don't appear to be scoped to bridge
like host_binding_ipv4
is? (The driver option key is com.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.