Hi.
I just re-did my networking on my hetzner server.
I need to do the NAT setup so guest VMs MAC-addresses are hidden.
But with post-up iptables -t nat -A POSTROUTING -s '10.10.20.0/24' -o eno1 -j MASQUERADE
It does not work.
I cannot ping host-guest vm, i cannot ping guest vm-host.
PVE interfaces:
The current VM im trying to setup to work is a Windows Server.
There i have set manual ip to 10.10.20.101, netmask 255.255.255.0, gateway 10.10.20.1. DNS 10.10.20.1 / 1.1.1.1.
qm guest vm config
What am i missing here?
I just re-did my networking on my hetzner server.
I need to do the NAT setup so guest VMs MAC-addresses are hidden.
But with post-up iptables -t nat -A POSTROUTING -s '10.10.20.0/24' -o eno1 -j MASQUERADE
It does not work.
I cannot ping host-guest vm, i cannot ping guest vm-host.
PVE interfaces:
Code:
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
address a.b.c.91/26
gateway a.b.c.65
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp
# bridge-ports eno1
# bridge-stp off
# bridge-fd 0
iface eno1 inet6 static
address "ipv6"::/64
auto vmbr0
iface vmbr0 inet static
address 10.10.20.1/28
# netmask 255.255.255.0
# gateway 10.10.20.1
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.20.0/24' -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.20.0/24' -o eno1 -j MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
The current VM im trying to setup to work is a Windows Server.
There i have set manual ip to 10.10.20.101, netmask 255.255.255.0, gateway 10.10.20.1. DNS 10.10.20.1 / 1.1.1.1.
qm guest vm config
Code:
root@pve:/etc/network# qm config 101
bios: ovmf
boot: order=ide0;ide2
cores: 2
cpu: host
efidisk0: vms:vm-101-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
ide0: vms:vm-101-disk-1,size=256G
ide2: none,media=cdrom
machine: pc-q35-6.1
memory: 16384
meta: creation-qemu=6.1.0,ctime=1644063483
name: WindowsServer2022
net1: virtio=DE:D5:CD:C7:33:86,bridge=vmbr0,firewall=1
numa: 0
onboot: 0
ostype: win11
scsihw: virtio-scsi-pci
smbios1: uuid=3b03d66f-fe4f-435d-ab55-64c3a2aa653a
sockets: 1
spice_enhancements: videostreaming=all
startup: order=2,up=30
tpmstate0: vms:vm-101-disk-2,size=4M,version=v2.0
vcpus: 2
vga: qxl,memory=48
vmgenid: 6ca629e6-da63-4178-8063-1c6a0d672ce2
What am i missing here?
