Hello there,
I'm running a Windows Server VM on Promox v5 in a NAT network configuration (I only have 1 public IP address) and I need to forward some ports from the Proxmox Host to my Windows Guest.
I thought it would be simpler to do it through Qemu rather than iptables but I'm new to KVM/Qemu and it took me a lot of time to figure it out... Anyway, I've finally found that I can do it by adding the 'hostfwd' option to the command used to start my VM. For instance, to forward TCP and UDP ports 3389 for RDP:
It works but I can't find a way to add it to the configuration file of my VM (the one located in /etc/pve/qemu-server/), so that I would be able to launch the VM with port forwarding from the Proxmox web front (I didn't find anything in here).
Does anyone know how to specify this option in the Qemu configuration file?
Thanks!
I'm running a Windows Server VM on Promox v5 in a NAT network configuration (I only have 1 public IP address) and I need to forward some ports from the Proxmox Host to my Windows Guest.
I thought it would be simpler to do it through Qemu rather than iptables but I'm new to KVM/Qemu and it took me a lot of time to figure it out... Anyway, I've finally found that I can do it by adding the 'hostfwd' option to the command used to start my VM. For instance, to forward TCP and UDP ports 3389 for RDP:
Code:
-netdev 'type=user,id=net0,hostname=myhostname,hostfwd=tcp::3389-:3389,hostfwd=udp::3389-:3389'
It works but I can't find a way to add it to the configuration file of my VM (the one located in /etc/pve/qemu-server/), so that I would be able to launch the VM with port forwarding from the Proxmox web front (I didn't find anything in here).
Does anyone know how to specify this option in the Qemu configuration file?
Thanks!