Proxmox VE 7.2 server with VM router for IP Address distribution for Vms

galvatec

Member
Sep 1, 2021
27
0
6
48
I have this Proxmox hosted on oneprovider.com with only one IP and I need to make this IP reach the OS router for it to distribute internet and Vms.

I created a VM with Nethserver and configured it as a gateway for the other VMs and now these others are getting IP and accessing the internet

Now my question is how can I access the Nwethserver through the public IP and thus be able to redirect the ports to the VMs?
 
Last edited:
Hi,

Now my question is how can I access the Nwethserver through the public IP and thus be able to redirect the ports to the VMs?
Using iptables in your PVE network configuration, e.g.:

Code:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport <PORT> -j DNAT --to <VM or CT Ip address>:<PORT>
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport <PORT> -j DNAT --to <VM or CT Ip address>:<PORT>
 

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!