mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1139] Domain with source port #934
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#934
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CyrosX on GitHub (May 30, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1139
I didn't find any notes about this:
I'm trying to achieve the following scenario:
https://DDNS:12345 -> Router forwards 12345 to 4848 on DOCKERHOST-IP
4848 (mapped to SSL Port of NPM) shall send it to DOCKERHOST-IP:port-of-container
Included is a SSL Certificate.
But it won't work :-/. I'll get NET::ERR_CERT_INVALID and the certificate is a dummy.
I've uploaded a Let's encrypt certificate, (key + domain.cer + ca.cer)
@chaptergy commented on GitHub (May 30, 2021):
Can you provide your docker-compose file, please? Maybe also the host configuration?
Just to make sure, have you also set the proxy host to use your ssl certificate?
@CyrosX commented on GitHub (May 30, 2021):
@chaptergy commented on GitHub (May 30, 2021):
Didn't you say port
4848? The docker compose file maps port4443to the ssl port of npm. I also think the domain names can not contain a port, you should just useurl.example.com@CyrosX commented on GitHub (May 30, 2021):
Sorry - 4848 was just an example, that I've changed the normal port mapping of the NPM docker container.
Hm, so if there are multiple services, which shall be exposed, I'll have to create the same amount of DDNS domains?
In my case I'm mapping several source ports to forwarding ports on the same domain.
@chaptergy commented on GitHub (May 31, 2021):
Ah, now I understand. I am not very familiar with this as well, but you could try to use the advanced tab as seen in https://github.com/jc21/nginx-proxy-manager/issues/252. Though you won't be able to disable port 80 and 443 without editing the config manually. The GUI is just made for using subdomains or subfolders, not ports.
@CyrosX commented on GitHub (May 31, 2021):
@chaptergy, thank you very much, spending your time to help me out here 😃.
Just to specify the last part - 4443 is 4848 in my first example.
So port nat-routing/proxying is everywhere (hopefully it's correct on a technical pov)
[*happens on network router/firewall] [**source port, destination port based]
Maybe I need to look up some best practices in regards of port based vs domain based routing and
secure docker services networking while exposing parts to the internet.
Docker internal DNS routing in its multiple network types to prevent double port exposition and disallowing the bypassing of the TLS-secured port, is something I'll need to learn about right now.
@aab12345 commented on GitHub (May 31, 2021):
You would be best off opening only 80/443 on your router, let NPM handle the requests. These are really the only two ports you need to open to the public really. My NPM is served over the following;
https://subdomain.domain.com > NPM > let NPM handle your forward/proxy requests.
Your NPM config on docker-compose could be;
Hope this helps?
@CyrosX commented on GitHub (May 31, 2021):
@el-profesor926 thank you, too!
I've did this now in combination with CNAMES directing to the DDNS (domain based routing),
but NPM works also nice with my non-default ports. (443,80 are already in use on host)
@aab12345 commented on GitHub (May 31, 2021):
fantastic, it's very easy to get your head around once you leave only 80 and 443 open to let NPM manage everything. SSL will work because by default you have 80 and 443 open, which is web non SSL + web SSL ports.
@chaptergy commented on GitHub (May 31, 2021):
So you were able to get it working? If so, great! Let me know if you did, then I can go ahead and close this issue. (Or you can close this issue yourself)
@CyrosX commented on GitHub (May 31, 2021):
Yeah, it‘s working very well! Thank you :)
@Macrisu commented on GitHub (Mar 10, 2023):
I have exactly the same problem...
rPI + docker.
rPI is behind a router (NAT)
In docker I run:
I can only use 443 for one service: EVCC, Pi-Home, or Home Assistant! ;(
I must open other ports on the Nginx Proxy manager docker container.
The problem still is that the domain source does not accept ports!
Any solution?
@bmmmm commented on GitHub (Mar 11, 2023):
@Macrisu is answered you in: https://github.com/NginxProxyManager/nginx-proxy-manager/discussions/2665