[GH-ISSUE #1969] Stream port ranges #1424

Open
opened 2026-02-26 07:30:56 +03:00 by kerem · 24 comments
Owner

Originally created by @pizzaandcheese on GitHub (Mar 31, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1969

have a simple addition I would like to request.
The ability to forward port ranges for streams.

According to the docs for Nginx it should be possible. https://nginx.org/en/docs/stream/ngx_stream_core_module.html#listen
Although when I attempt to forward a range in NPM it requires me to input 1 port number and won't accept a range.

Originally created by @pizzaandcheese on GitHub (Mar 31, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1969 have a simple addition I would like to request. The ability to forward port ranges for streams. According to the docs for Nginx it should be possible. https://nginx.org/en/docs/stream/ngx_stream_core_module.html#listen Although when I attempt to forward a range in NPM it requires me to input 1 port number and won't accept a range.
Author
Owner

@sanegaming commented on GitHub (Apr 20, 2022):

I am also needing this feature, I have around 4,000 ports I need to setup and doing it one at a time is not really feasible. If anyone has any other work arounds please let me know.

<!-- gh-comment-id:1103463530 --> @sanegaming commented on GitHub (Apr 20, 2022): I am also needing this feature, I have around 4,000 ports I need to setup and doing it one at a time is not really feasible. If anyone has any other work arounds please let me know.
Author
Owner

@odjhl88 commented on GitHub (May 15, 2022):

So, I thought I'd have a look at the conf file generated by NPM. In my case I'm using the Alpine script for Proxmox. This puts the conf file in /data/nginx/stream/x.conf . Here's the code ouput for one of the files.

# ------------------------------------------------------------
# <PORT> TCP: 1 UDP: 1
# ------------------------------------------------------------


server {
  listen <PORT>;
listen [::]:<PORT>;


  proxy_pass <FORWARD_IP>:<PORT>;

  # Custom
  include /data/nginx/custom/server_stream[.]conf;
  include /data/nginx/custom/server_stream_tcp[.]conf;
}


server {
  listen <PORT> udp;
listen [::]:<PORT> udp;

  proxy_pass <FORWARD_IP>:<PORT>;

  # Custom
  include /data/nginx/custom/server_stream[.]conf;
  include /data/nginx/custom/server_stream_udp[.]conf;
}

So, I thought in my brilliance, I'd just modify the file with a port range at the end. Aparently, that's not how this works because now NPM doesn't load it's web interface at all. If someone thinks I might be on to something here, feel free to modify my screw up and see if this can be accomplished.

# ------------------------------------------------------------
# <PORT-START>-<PORT-END> TCP: 1 UDP: 1
# ------------------------------------------------------------


server {
  listen <PORT-START>-<PORT-END>;
listen [::]:<PORT-START>-<PORT-END>;


  proxy_pass <FORWARD_IP>:<PORT-START>-<PORT-END>;

  # Custom
  include /data/nginx/custom/server_stream[.]conf;
  include /data/nginx/custom/server_stream_tcp[.]conf;
}


server {
  listen <PORT-START>-<PORT-END> udp;
listen [::]:<PORT-START>-<PORT-END> udp;

  proxy_pass <FORWARD_IP>:<PORT-START>-<PORT-END>;

  # Custom
  include /data/nginx/custom/server_stream[.]conf;
  include /data/nginx/custom/server_stream_udp[.]conf;
}

Thanks in advance.

<!-- gh-comment-id:1127042258 --> @odjhl88 commented on GitHub (May 15, 2022): So, I thought I'd have a look at the conf file generated by NPM. In my case I'm using the Alpine script for Proxmox. This puts the conf file in `/data/nginx/stream/x.conf` . Here's the code ouput for one of the files. ``` # ------------------------------------------------------------ # <PORT> TCP: 1 UDP: 1 # ------------------------------------------------------------ server { listen <PORT>; listen [::]:<PORT>; proxy_pass <FORWARD_IP>:<PORT>; # Custom include /data/nginx/custom/server_stream[.]conf; include /data/nginx/custom/server_stream_tcp[.]conf; } server { listen <PORT> udp; listen [::]:<PORT> udp; proxy_pass <FORWARD_IP>:<PORT>; # Custom include /data/nginx/custom/server_stream[.]conf; include /data/nginx/custom/server_stream_udp[.]conf; } ``` So, I thought in my brilliance, I'd just modify the file with a port range at the end. Aparently, that's not how this works because now NPM doesn't load it's web interface at all. If someone thinks I might be on to something here, feel free to modify my screw up and see if this can be accomplished. ``` # ------------------------------------------------------------ # <PORT-START>-<PORT-END> TCP: 1 UDP: 1 # ------------------------------------------------------------ server { listen <PORT-START>-<PORT-END>; listen [::]:<PORT-START>-<PORT-END>; proxy_pass <FORWARD_IP>:<PORT-START>-<PORT-END>; # Custom include /data/nginx/custom/server_stream[.]conf; include /data/nginx/custom/server_stream_tcp[.]conf; } server { listen <PORT-START>-<PORT-END> udp; listen [::]:<PORT-START>-<PORT-END> udp; proxy_pass <FORWARD_IP>:<PORT-START>-<PORT-END>; # Custom include /data/nginx/custom/server_stream[.]conf; include /data/nginx/custom/server_stream_udp[.]conf; } ``` Thanks in advance.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 20, 2024):

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

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

@sanegaming commented on GitHub (Mar 1, 2024):

Please continue to consider.

<!-- gh-comment-id:1972251722 --> @sanegaming commented on GitHub (Mar 1, 2024): Please continue to consider.
Author
Owner

@scroguard commented on GitHub (Apr 1, 2024):

just had to enter a large range manually, this would be an amazing feature to have.

<!-- gh-comment-id:2030138857 --> @scroguard commented on GitHub (Apr 1, 2024): just had to enter a large range manually, this would be an amazing feature to have.
Author
Owner

@RetiredVillain commented on GitHub (May 21, 2024):

I would like to see this added as well.

<!-- gh-comment-id:2123443489 --> @RetiredVillain commented on GitHub (May 21, 2024): I would like to see this added as well.
Author
Owner

@Beanietech commented on GitHub (Jun 7, 2024):

yes honestly please put this in. cause trying to port game servers is a huge pain..... and that is literally our last step before auto deployment servers....

<!-- gh-comment-id:2154307008 --> @Beanietech commented on GitHub (Jun 7, 2024): yes honestly please put this in. cause trying to port game servers is a huge pain..... and that is literally our last step before auto deployment servers....
Author
Owner

@duzhen commented on GitHub (Jun 10, 2024):

looking forward to have this functionalitiy

<!-- gh-comment-id:2157289504 --> @duzhen commented on GitHub (Jun 10, 2024): looking forward to have this functionalitiy
Author
Owner

@scroguard commented on GitHub (Jun 10, 2024):

this would be amazing to have, it's a real pain to have to enter each port of a large range individually.

<!-- gh-comment-id:2158884643 --> @scroguard commented on GitHub (Jun 10, 2024): this would be amazing to have, it's a real pain to have to enter each port of a large range individually.
Author
Owner

@GamerClassN7 commented on GitHub (Jun 28, 2024):

Any news ?

<!-- gh-comment-id:2196182184 --> @GamerClassN7 commented on GitHub (Jun 28, 2024): Any news ?
Author
Owner

@gr33k commented on GitHub (Aug 8, 2024):

Trying to setup a stream to forward SIP ports to a PBX - I'd love to be able to add 10,000-20,000 UDP range...but as we all know - currently not possible. Please add this feature :)

<!-- gh-comment-id:2276292902 --> @gr33k commented on GitHub (Aug 8, 2024): Trying to setup a stream to forward SIP ports to a PBX - I'd love to be able to add 10,000-20,000 UDP range...but as we all know - currently not possible. Please add this feature :)
Author
Owner

@iamdagy commented on GitHub (Aug 20, 2024):

@gr33k have you found a work around? im on the same boat trying to open many udp ports fora pbx.

<!-- gh-comment-id:2297824763 --> @iamdagy commented on GitHub (Aug 20, 2024): @gr33k have you found a work around? im on the same boat trying to open many udp ports fora pbx.
Author
Owner

@Jason733i commented on GitHub (Sep 29, 2024):

Would also love this feature!

<!-- gh-comment-id:2381534556 --> @Jason733i commented on GitHub (Sep 29, 2024): Would also love this feature!
Author
Owner

@jsapede commented on GitHub (Oct 24, 2024):

would like this too

<!-- gh-comment-id:2435021332 --> @jsapede commented on GitHub (Oct 24, 2024): would like this too
Author
Owner

@paulmataruso commented on GitHub (Nov 8, 2024):

Really would like this feature.

<!-- gh-comment-id:2465479892 --> @paulmataruso commented on GitHub (Nov 8, 2024): Really would like this feature.
Author
Owner

@aflorzy commented on GitHub (Nov 24, 2024):

This would be a very convenient feature

<!-- gh-comment-id:2496409049 --> @aflorzy commented on GitHub (Nov 24, 2024): This would be a very convenient feature
Author
Owner

@gr33k commented on GitHub (Nov 25, 2024):

Thank you all for requesting this cool feature!!! Sadly - I haven't found a solution yet as the stream is a single port.

Instead - I have two PBX...one with the main portforwards going to it. So I just setup a sip trunk between that PBX and the other one....Perfect? No....remote users can register a phone/softphone to the 2nd PBX - But it works good enough for testing.

I suspect a SBC may be able to address this as well ... but I haven't had the time to explore this yet.

<!-- gh-comment-id:2498922719 --> @gr33k commented on GitHub (Nov 25, 2024): Thank you all for requesting this cool feature!!! Sadly - I haven't found a solution yet as the stream is a single port. Instead - I have two PBX...one with the main portforwards going to it. So I just setup a sip trunk between that PBX and the other one....Perfect? No....remote users can register a phone/softphone to the 2nd PBX - But it works good enough for testing. I suspect a SBC may be able to address this as well ... but I haven't had the time to explore this yet.
Author
Owner

@pabloeltaco commented on GitHub (Dec 24, 2024):

+1 for Port range forwarding. I have an FTP server and I need to forward 100 ports manually :-(

<!-- gh-comment-id:2560524916 --> @pabloeltaco commented on GitHub (Dec 24, 2024): +1 for Port range forwarding. I have an FTP server and I need to forward 100 ports manually :-(
Author
Owner

@github-actions[bot] commented on GitHub (Jul 18, 2025):

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

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

@Rinpyre commented on GitHub (Jul 18, 2025):

I'd also need this!

<!-- gh-comment-id:3089868319 --> @Rinpyre commented on GitHub (Jul 18, 2025): I'd also need this!
Author
Owner

@gr33k commented on GitHub (Jul 28, 2025):

Still hoping for port range in Streams ;)

<!-- gh-comment-id:3128438319 --> @gr33k commented on GitHub (Jul 28, 2025): Still hoping for port range in Streams ;)
Author
Owner

@rikka-chunibyo commented on GitHub (Dec 5, 2025):

PLEASE add this

<!-- gh-comment-id:3618791735 --> @rikka-chunibyo commented on GitHub (Dec 5, 2025): PLEASE add this
Author
Owner

@kaktuss77 commented on GitHub (Dec 21, 2025):

+1 please

thanks

<!-- gh-comment-id:3678671037 --> @kaktuss77 commented on GitHub (Dec 21, 2025): +1 please thanks
Author
Owner

@aurelienizl commented on GitHub (Dec 21, 2025):

Still waiting for this feature too!

<!-- gh-comment-id:3678813367 --> @aurelienizl commented on GitHub (Dec 21, 2025): Still waiting for this feature too!
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#1424
No description provided.