-
Notifications
You must be signed in to change notification settings - Fork 9
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
wider_world_to_container not applying when external_network_interface is 'lo' #405
Comments
Hi @xepa, thank you for reaching out. I had never really thought about the use case of NATting traffic from the host itself to a container, mostly because I probably always used port-publishing for this, but I understand how NATting it could still be preferable. I have not thought a potential solution for this through entirely, so I'd like to get input on what you think would be a good solution from a usability standpoint:
I personally think that the last one would probably be the most consistent, although I also don't dislike the other options. WDYT? (Please note that I can't give you any kind of timeline on when I would get around to implementing this feature, although I'm of course happy to receive and review PRs.) |
Hi @pitkley thanks for the response, I am glad that this is listed as an enhancement and I might be able to take a look some implementation myself, hopefully I can brush up my rust knowledge, and find some time somewhere to actually dive in. Please see my thoughts on the following:
|
I am currently using
wider_world_to_container rules
to "bind" containers to localhost. If there is another way of doing this please let me know.With the above config I would expect a connection from the host running the dockers to
127.0.0.1 port 9999
to be routed to the containercontainer
on the docker networknetwork
I notice that the dnat rules this config creates are placed in the following (other rules are removed)
this might work for external traffic but localhost traffic does not pass the
prerouting nat chain
but instead uses theoutput nat chain
with the following I can allow this.The text was updated successfully, but these errors were encountered: