I try to setup a proxmox node with an external ip class map to an internal ip class :
62.xxx.yyy.zzz/24 <--> 192.168.yyy.zzz/24
each external ip match on internal ip, so each VM got her own external ip. the proxmox host got is own external ip (outside the /24 range) and got a web access by himself.
if I use : # NAT table rules *nat :POSTROUTING ACCEPT [0:0]
# Forward traffic through eth0 - Change to match you out-interface
-A POSTROUTING -s 192.168.0.0/16 -o vmbr0 -j MASQUERADE
# don't delete the 'COMMIT' line or these rules won't be processed
COMMIT
all the VM with ip 192.168.x.x can access the web but with the ip address of the host.
If I change the -A POSTROUTING LINE with :
-A PREROUTING -o vmbr0 -d 62.xxx.yyy.0/24 -j DNAT --to-destination 192.168.yyy.0/24
-A POSTROUTING -o vmbr1 -s 192.168.yyy.0/24 -j NETMAP DNAT --to-destination 62.xxx.yyy.0/24
I got an error for the DNAT destination not being an ip but a class, it seems that the NETMAP is not supported ...
any idea to point me to ?
Thanks !
Stéphane