[GH-ISSUE #390] Wrong network used as the front network #331

Closed
opened 2026-02-26 06:32:21 +03:00 by kerem · 1 comment
Owner

Originally created by @joelcollet on GitHub (May 2, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/390

Hello

i dunno if this is a bug related to docker itself or the proxy manager, but i have a "weird" issue with my compose file:
docker-compose.yml.txt
Actually i want to use a separate network for the database and for the proxy network (and i want even to go further by dedicating a network for the proxy external interface and the container i want to be proxied)
the weird thing is that using the compose file attached , the ports are opened (and natted) on the "wrong" interface (the one used for the database for instance) as you can see on he iptables here
Chain DOCKER (3 references)
target prot opt source destination

ACCEPT tcp -- anywhere 172.30.0.2 tcp dpt:https
ACCEPT tcp -- anywhere 172.30.0.2 tcp dpt:http
while i want them to be natted on the proxy net interface (a way to isolate the "external" access from the backend )
Is there a simple way to get this thing done as i want, or should i rely on separate docker files or custom iptables (which i really want to avoid)
Regards
Joël

Originally created by @joelcollet on GitHub (May 2, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/390 Hello i dunno if this is a bug related to docker itself or the proxy manager, but i have a "weird" issue with my compose file: [docker-compose.yml.txt](https://github.com/jc21/nginx-proxy-manager/files/4567827/docker-compose.yml.txt) Actually i want to use a separate network for the database and for the proxy network (and i want even to go further by dedicating a network for the proxy external interface and the container i want to be proxied) the weird thing is that using the compose file attached , the ports are opened (and natted) on the "wrong" interface (the one used for the database for instance) as you can see on he iptables here Chain DOCKER (3 references) target prot opt source destination ACCEPT tcp -- anywhere 172.30.0.2 tcp dpt:https ACCEPT tcp -- anywhere 172.30.0.2 tcp dpt:http while i want them to be natted on the proxy net interface (a way to isolate the "external" access from the backend ) Is there a simple way to get this thing done as i want, or should i rely on separate docker files or custom iptables (which i really want to avoid) Regards Joël
kerem 2026-02-26 06:32:21 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@joelcollet commented on GitHub (May 2, 2020):

I will close the bug..since it is not a bug of the manager, but more a "feature" of docker/docker-compose. Actually in case of multiple network it looks like the choice of the network on which the port setting/natting will be applied is based on alphabetic order...i changed proxy to aproxy..and ..Voila the port are natted on the right interface (aproxy)...
Sorry
JoËl

<!-- gh-comment-id:623002276 --> @joelcollet commented on GitHub (May 2, 2020): I will close the bug..since it is not a bug of the manager, but more a "feature" of docker/docker-compose. Actually in case of multiple network it looks like the choice of the network on which the port setting/natting will be applied is based on alphabetic order...i changed proxy to aproxy..and ..Voila the port are natted on the right interface (aproxy)... Sorry JoËl
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#331
No description provided.