[GH-ISSUE #525] Configure redirects for a range of ports #446

Closed
opened 2026-02-26 06:32:53 +03:00 by kerem · 6 comments
Owner

Originally created by @sign0 on GitHub (Jul 27, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/525

Is it possible to configure redirects (stream) for a range of ports to a host ?

For example:

  • example.com:3000 -> 10.1.0.100:3000
  • example.com:3001 -> 10.1.0.100:3001
    ... to
  • example.com:4999 -> 10.1.0.100:4999
Originally created by @sign0 on GitHub (Jul 27, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/525 Is it possible to configure redirects (stream) for a range of ports to a host ? For example: - example.com:3000 -> 10.1.0.100:3000 - example.com:3001 -> 10.1.0.100:3001 ... to - example.com:4999 -> 10.1.0.100:4999
kerem 2026-02-26 06:32:53 +03:00
Author
Owner

@jimmyeao commented on GitHub (Aug 5, 2020):

I too would like to figure this out!

<!-- gh-comment-id:669165852 --> @jimmyeao commented on GitHub (Aug 5, 2020): I too would like to figure this out!
Author
Owner

@Lochnair commented on GitHub (Dec 19, 2020):

I'd like to see this being possible as well.

I tested a simple configuration that supports this on a standalone Nginx instance:

stream {
        server {
                listen 21000-21999;
                proxy_pass 1.2.3.4:$server_port;
        }
}

Which works as expected. I'm not sure how to best show this in the GUI though. AFAICS we can do one of two things, either do I like I did above and use the incoming port in the proxy_pass, or redirect multiple ports to one set port, not that I can think of a reason to do that.

The database schema would also have to be updated to allow for multiple ports.

In any case we'd need a more recent version of OpenResty since port ranges were introduced in 1.15.10, and we're on 1.15.8 AFAIK.

Port ranges (1.15.10) are specified with the first and last port separated by a hyphen:

listen 127.0.0.1:12345-12399;
listen 12345-12399;

<!-- gh-comment-id:748541614 --> @Lochnair commented on GitHub (Dec 19, 2020): I'd like to see this being possible as well. I tested a simple configuration that supports this on a standalone Nginx instance: ``` stream { server { listen 21000-21999; proxy_pass 1.2.3.4:$server_port; } } ``` Which works as expected. I'm not sure how to best show this in the GUI though. AFAICS we can do one of two things, either do I like I did above and use the incoming port in the proxy_pass, or redirect multiple ports to one set port, not that I can think of a reason to do that. The database schema would also have to be updated to allow for multiple ports. In any case we'd need a more recent version of OpenResty since port ranges were introduced in 1.15.10, and we're on 1.15.8 AFAIK. > Port ranges (1.15.10) are specified with the first and last port separated by a hyphen: > > listen 127.0.0.1:12345-12399; > listen 12345-12399;
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2024):

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

<!-- gh-comment-id:2021774887 --> @github-actions[bot] commented on GitHub (Mar 27, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@jimmyeao commented on GitHub (Mar 27, 2024):

Any progress on this?

<!-- gh-comment-id:2022788598 --> @jimmyeao commented on GitHub (Mar 27, 2024): Any progress on this?
Author
Owner

@github-actions[bot] commented on GitHub (Dec 19, 2024):

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

<!-- gh-comment-id:2552623120 --> @github-actions[bot] commented on GitHub (Dec 19, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Jan 3, 2026):

Issue was closed due to inactivity.

<!-- gh-comment-id:3706609394 --> @github-actions[bot] commented on GitHub (Jan 3, 2026): Issue was closed due to inactivity.
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#446
No description provided.