NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
21.99k stars 2.53k forks source link

Stream - Port Forwarding does not work #2124

Open rodrigogarcia2021 opened 2 years ago

rodrigogarcia2021 commented 2 years ago

Checklist

Describe the bug

If I have a stream host, listen port 21 (on 0.0.0.0) destination port 21, works, but if I have listen port 2021 or other port on 0.0.0.0 destination port 21 (the IP is a 192.168.0.x range), the proxy manager does not open the port. When I try with telnet, says refused. Is not the firewall because in the docker host, a VPS debian 11, i can't run ncat -l -4 -k -p 2021 because the port is being used by other aplication (docker-proxy), when I stop the docker that run nginx proxy manager and the port 2021 is released, i can connect from my laptop to the vps using ncat -l -k -4 -p 2021 without problems.

Nginx Proxy Manager Version

2.9.16 to 2.9.18 latest

To Reproduce Steps to reproduce the behavior:

  1. Go to stream
  2. Click on add stream
  3. Listen port 2021
  4. Forward host any LAN IP (qemu) port 21 TCP and UDP
  5. telnet "WAN IP docker" 2021 connection refused

Expected behavior

Can connect.

Screenshots

Operating System

Debian 11 amd64

Additional context

The connection between both VPS, the docker VPS and the other is fine, tested using ncat and ftp, so is not a network problem and, from my pc to the docker VPS the connection is fine. Only works when the port are the same Listen and Forward Port.

UPDATE:

Ok my bad, is not clear for my the documentation, the only port that docker-compose expone is the port Listen, the internal port, is managed by docker-proxy and is not like other dockers that need specify the internal port to open. So, close the bug.

ahakobyan79 commented 1 year ago

There seem to be a bug with Streams. I've setup all forwarding correctly on my router, and created 3 streams. The first created stream worked actually, and worked fine, any other after that didn't. And even when I removed all and recreated the same forwardings, none worked. Looks like nginx proxy manager failed and stopped.

tried restarting the container, but it didn't do much, none of streams are working.

github-actions[bot] commented 4 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1:

Vertux commented 2 months ago

I just ran into the same problem. I have created a stream for port 25, but it is not working. nmap shows that the port is closed when I scan the NPM host. On the other hand, a scan of the destination host shows that port 25 is open. I am using NPM v2.11.2 / Debian 12.5.

EDIT: I made a very stupid mistake, I forgot about the firewall on the NPM host. 🙄 Now everthing works fine.