I have a Hetzner server running Debian 11 and Proxmox 7, on which I'm running 3 VMs with success. I use a NAT setup for those, which is very simple since I don't need to forward any ports from the outside, the VMs just need to access the internet. This is the configuration I was running until now, and everything worked fine (public IPs hidden for obvious reasons).
Now I need to add one CT (or VM) with its own public IP, so It can directly access and be accessed on the internet, like a real physical machine. I ordered one more public IPv4 address, got a MAC registered with Hetzner, and used that MAC with the new public IP on a new CT (also tried a VM). The new IP is on the same subnet as the old one, and its aaa.bbb.ccc.187. It didn't work, and whatever configurations I've found didn't work. Hetzners tutorials also didn't work and they seem a bit hard to understand, like poorly translated.
Any suggestions or config samples?
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp9s0
iface enp9s0 inet static
address aa.bb.cc.190/26
gateway aa.bb.cc.129
up route add -net aa.bb.cc.128 netmask 255.255.255.192 gw aa.bb.cc.129 dev enp9s0
# route aa.bb.cc.128/26 via aa.bb.cc.129
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 enp9s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp9s0 -j MASQUERADE
Now I need to add one CT (or VM) with its own public IP, so It can directly access and be accessed on the internet, like a real physical machine. I ordered one more public IPv4 address, got a MAC registered with Hetzner, and used that MAC with the new public IP on a new CT (also tried a VM). The new IP is on the same subnet as the old one, and its aaa.bbb.ccc.187. It didn't work, and whatever configurations I've found didn't work. Hetzners tutorials also didn't work and they seem a bit hard to understand, like poorly translated.
Any suggestions or config samples?