project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Feature] Using non-standard ports in the case of NAT IPs and port forwarding to access multiple PVEs with the same public IP.

Open federicolm opened this issue 7 months ago • 2 comments

Describe the feature

The feature I need is to be able to connect Proxmox nodes and virtualized Proxmox clusters that I use for lab experiments, which are behind NAT on non-standard ports, namely: public IP (port, example 8008) ---> private IP pve: 8006 So I can see and manage them from Pegaprox. I tried specifying the specific port to the right of the public IP, but this feature wasn't implemented. For example, on the Proxmox Android app, I can enter custom ports to connect these Proxmox nodes and Proxmox clusters to custom ports without any problems.

Use Case

Connect Proxmox nodes and Proxmox clusters that have port forwarding on non-default ports.

Alternatives considered

The alternative is not to use Pegaprox for these cases, too bad!

How important is this for you?

It would be really great and useful to have this feature to do great things!

Checklist

  • [ ] I have searched existing issues and discussions to make sure this hasn't been requested before Yes, unfortunately I found a rejected feature, number #255, but in that case I noticed that the reasons given could be "weak" for this feature as it was talking about reverse proxy, instead I have the problem that I have a NAT IP and many Proxmox servers that should all exit on the same port 8006, which is impossible and therefore I created port forwarding on non-standard ports.

I sincerely hope you'll consider adding this feature sooner or later, even if it's hidden "deep down," because in home labs, everything is a constant NAT/port forwarding. Congratulations on the wonderful work you've done!

federicolm avatar Apr 30 '26 13:04 federicolm

Hi @federicolm — fair point, this is the NAT/port-forward case (different from #255 which was about reverse-proxy fronting). For a homelab with multiple PVEs sharing one public IP it actually makes sense.

Noted for one of the next releases. The config side is straightforward (we already have an internal port field on the cluster object); the part that needs care is making sure all the places that hardcode :8006 in URL strings (cluster API, vncproxy, vncwebsocket, storage download, …) consume that field instead. Until that's all wired up we'd rather not ship half a fix.

If you want to track progress, I'll update this thread when there's a branch.

— Marcus

mkellermann97 avatar Apr 30 '26 14:04 mkellermann97

This landed — clusters carry an api_port field (default 8006) in the cluster config + DB row. Set it when adding/editing the cluster from PegaProx Settings → Clusters → Edit → API port. The whole call surface now reads self.api_port instead of the hard-coded 8006, so https://public-ip:8008 → 192.168.x.y:8006 NAT setups work without further config.

For Android-app-parity port-in-host strings like 1.2.3.4:8008, the host field accepts that form too — we parse off a trailing port and feed it into api_port at save time.

Closing as resolved. opencollective.com/pegaprox keeps the NAT/edge-deployment plumbing in good shape.

— MK

mkellermann97 avatar May 30 '26 11:05 mkellermann97