The small linux problem thread

Some time ago, I had to replace VMware with Proxmox for a friend of a friend, here are the details:

That works fine with SPICE, but it “has too many steps” to connect, and “it looks different than VMware”.

So I’ve been thinking… Is there a way to RDP into host, port forward to guest with interface connected to vmbr99 not bridged to any physical port on the host.

So far, I have:

  • Proxmox host connected with 192.168.88.88 on MikroTik router
  • vmbr99 with 10.0.100.0/24 address range
  • Windows guest with manual IP setup: 10.0.100.10, netmask 255.255.255.0, no gateway or DNS
  • Laptops that are used to remote in to VMs on same 192.168.88.0/24 network as Proxmox host

Someone tried to port forward to LXC here, but generally it was met with “you shouldn’t do that”.

I did find some guides, but they may be fairly outdated, so I have no idea what is going on.

General idea is:

enable forwarding:
net.ipv4.ip_forward = 1

add some rules:

iptables -t nat -A PREROUTING -p tcp --dport 50001 -j DNAT --to-destination 10.0.100.10:3389
iptables -t nat -A POSTROUTING -p tcp -d 10.0.100.10 --dport 3389 -j SNAT --to-source 192.168.88.88

And it should work, but it doesn’t. I did turn off firewall on Windows, enabled remote desktop, added authorized users, I even tried the same thing with Linux and web server (but forwarding to port 80, obviously) and it doesn’t work either.

What I basically want is laptop rdp → proxmox port 50001 → Windows guest port 3389.