new publick network in winsrv2008r2 after proxmox reboot

marty0701

New Member
Jun 28, 2018
3
0
1
38
Hello.
i install proxmox Virtual Environment 5.2-3, my network settings is

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug enp1s0

iface enp1s0 inet static
address x.x.x.71
netmask 255.255.255.0
gateway x.x.x.1
dns-nameservers xxx.xx.xx.19 xxx.xx.xx.19 xxx.xxx.xxx.91
# dns-* options are implemented by the resolvconf package, if installed

auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
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 '10.10.10.0/24' -o enp1s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp1s0 -j MASQUERADE

post-up iptables -t nat -A PREROUTING -i enp1s0 -p tcp --dport 3389 -j DNAT --to 10.10.10.2:3389
post-down iptables -t nat -D PREROUTING -i enp1s0 -p tcp --dport 3389 -j DNAT --to 10.10.10.2:3389

i create a vm, on the network i specified bridge, vmbr0. Install winsrv2008r2, after installation i specified ip address manually.
winsrv network settings is:
ip 10.10.10.2
mask 255.255.255.0
gw 10.10.10.1
first of all i change network type to private, change fw settings, ok, work.

Every time, then i restart proxmox windows create new network and change network type to public. fw rules stop working. What i do wrong?
 
The problem is that on every network up the vmbr get a new mac address and so windows think there is a new network.

You could set the mac address manual.
add this line in your network config in the vmbr section.

Code:
hwaddress ether <mac address>