Easy Way to Automatically Forward Ports to VM's / LXC Containers

bugattiguy527

New Member
Jul 7, 2024
10
0
1
Hello! So I self-host several things across many VMs and LXC containers. The self-hosted projects need to be accessible from the internet and so my way of doing that was to use iptables to say anything on port 3000 will get directed to the IP of the LXC container that had the project on port 3000 that needs to be accessible from the internet. Unfortunately, it's annoying when I have to create many of these a day. I wrote a script to do this for me but I'm wondering if there is a better or easier way to do this (maybe even from inside the proxmox control panel). Does anyone know of a better way to direct ports to go to certain IPs? Or maybe have a similar way to how in a docker container you can set the network mode to host? Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!