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 only internal networks #258

Closed
kaosmonk opened this issue Oct 29, 2017 · 6 comments
Closed

Allow only internal networks #258

kaosmonk opened this issue Oct 29, 2017 · 6 comments

Comments

@kaosmonk
Copy link

Hello,

I'd like to have some containers exposed only to internal networks as explained in jwilder/nginx-proxy docs but since I am using separate containers in my setup - official nginx and docker-gen images - I'm not sure how to do exactly the same. Should I edit the nginx.tmpl or am I missing some existing options?

Thanks!

@tomfun
Copy link

tomfun commented Feb 7, 2018

@kaosmonk as I understand, it is already done. I use almost official nginx.tmpl (with one important fix for many networks) and official nginx and docker-gen docker images. My APIs inside one virtual network with nginx, but it is internal docker network.

@returntrip
Copy link

returntrip commented Mar 2, 2018

@kaosmonk just noticed this open issue. To make NETWORK_ACCESS=internal on docker-gen do the following:

Manually mount network_internal.conf in /etc/nginx/network_internal.conf and use the nginx-proxy from https://github.com/jwilder/nginx-proxy

I have opened #278 to see if some good soul can fix the Dockerfile

@kaosmonk
Copy link
Author

kaosmonk commented Mar 3, 2018

Thanks a lot!

@jlegido
Copy link

jlegido commented Jul 5, 2019

Jus for the records, with official nginx image it works as expected, mounting:

-v /path/to/network_internal.conf:/etc/nginx/network_internal.conf

I tested it with 3 containers (official nginx, nginx-gen and nginx-letsencryptcompanion)

@hacker-h
Copy link

hacker-h commented Jun 9, 2020

I had a similar use case:
I needed to proxy containers which are only connected to an internal network (to deny egress traffic),
therefore they cannot expose ports and require some template configuration to be proxiable.
I described the issue and my solution in the google group:
https://groups.google.com/forum/#!topic/nginx-proxy/YL5GypqStOA

@buchdag buchdag closed this as completed May 16, 2024
@buchdag
Copy link
Member

buchdag commented May 16, 2024

This repo should no longer handle issues or discussions related to nginx-proxy / the nginx-proxy template, unless there is something we need to change / fix in docker-gen in order to allow a change / fix in nginx-proxy.

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

6 participants