proxmox virtual machine port open

toprak

Member
Apr 10, 2016
3
0
21
35
hello,

proxmox in virtual machine how can I port open ?

I want to open 9339.

ipconfig.png


my proxmox server ip etc. in such a way that 163.145.15.54:9339
 
proxmox in virtual machine how can I port open ?

I want to open 9339.

ipconfig.png


my proxmox server ip etc. in such a way that 163.145.15.54:9339


AFAIU you mean port forwarding to VM.


Not possible when using the built-in NAT - define a bridged network without physical NIC. The with iptables you can

- NAT to the bridged network

- forwarding ports to bridged network
 
AFAIU you mean port forwarding to VM.


Not possible when using the built-in NAT - define a bridged network without physical NIC. The with iptables you can

- NAT to the bridged network

- forwarding ports to bridged network
thank you master.

how can I do it?

Can you give an example for iptables ?
 
If I interpret your screenshots correctly, something like this should work:

Code:
iptables -t nat -A PREROUTING -d 163.145.15.54 -p tcp --dport 9339 -j DNAT --to-destination 10.0.2.15:9339

This assumes that your Proxmox-Host is 163.145.15.54 and you have on that very machine a local-only network of 10.0.2.2 and a VM with IP 10.0.2.15 with a port 9339 to forward to. Maybe you also need masquerading and ip-forwarding enabled.

But please have a look at https://pve.proxmox.com/wiki/Network_Model