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

Allow mapping IPv4 listen addresses to IPv6 #48

Open
mildred opened this issue Mar 4, 2020 · 2 comments
Open

Allow mapping IPv4 listen addresses to IPv6 #48

mildred opened this issue Mar 4, 2020 · 2 comments

Comments

@mildred
Copy link

mildred commented Mar 4, 2020

When port mapping is defined in Docker, it might be specifying a HostIP in addition to the HostPort. If the HostIp is defined, it's generally an IPv4 address. it might be great to have docker-ipv6nat be able to convert automatically the IPv4 listen addresses to IPv6 based on some mapping.

The use case is to work with the Nomad scheduler which automatically detect the HostIP based on network detection on the host. it does not support IPv6 there, and it might not be in the future as docker itself does not support IPv6 port mapping.

Suggested CLI flag: -map-ipv4=192.168.3.0/24=2001:912:1480:11::226,... (for example)

I can provide a PR for that

@bephinix
Copy link
Contributor

@robbertkl AFAIK, Docker-IPv6NAT should only mirror Docker's own IPv4 behaviour to IPv6. I think, this is not a part of Docker-IPv6NAT. What do you think?

@robbertkl
Copy link
Owner

I'm a bit on the fence on this one. You're right, the mapping is not part of Docker itself. However, the functionality of binding to an IP address is available in Docker but cannot be mirrored properly by docker-ipv6nat. This suggests a way to still be able to do it.

There's an associated PR as well (#50), but did not have time yet to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants