Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document host_ipv4 + host_ipv6 #21959

Open
1 task done
polarathene opened this issue Feb 4, 2025 · 1 comment
Open
1 task done

Document host_ipv4 + host_ipv6 #21959

polarathene opened this issue Feb 4, 2025 · 1 comment
Labels
area/engine Issue affects Docker engine/daemon area/networking Relates to anything around networking

Comments

@polarathene
Copy link
Contributor

polarathene commented Feb 4, 2025

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:

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.

@polarathene polarathene added the status/triage Needs triage label Feb 4, 2025
@polarathene
Copy link
Contributor Author

If it's helpful, I recently put this together:

Image

@aevesdocker aevesdocker added area/engine Issue affects Docker engine/daemon area/networking Relates to anything around networking and removed status/triage Needs triage labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Issue affects Docker engine/daemon area/networking Relates to anything around networking
Projects
None yet
Development

No branches or pull requests

2 participants