Monday, April 22, 2019

Setting up Windows VM on Proxmox with 1 IP

https://www.tienle.com/2014/06-03/setting-up-windows-vm-on-proxmox-with-1-ip.html

We will edit /etc/network/interfaces and add vmbr2 as follows:

1
2
3
4
5
6
7
8
9
10
11
12
auto vmbr2
    iface vmbr2 inet static
    address 192.168.0.254
    netmask 255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr0  -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr0  -j MASQUERADE
    post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 13389 -j DNAT --to 192.168.0.1:3389
    post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 13389 -j DNAT --to 192.168.0.1:3389

No comments:

Post a Comment