[SOLVED] Extra IP address for a VM on Hetzner Proxmox server

pizza

Renowned Member
Nov 7, 2015
96
8
73
I have a dedicated Proxmox server on Hetzner with a single IP address, Is it possible with this configuration to add an extra single (public) IP address which a VM directly can use (without NAT rules)?

Code:
iface enp0s31f6 inet static
        address 138.x.x.18/26
        gateway 138.x.x.1

iface eth0 inet manual

auto vmbr0

iface vmbr0 inet static
  address  192.168.124.1
  netmask  255.255.255.0
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
  up iptables -t nat -A POSTROUTING -s '192.168.124.0/24' -o enp0s31f6 -j MASQUERADE
  down iptables -t nat -D POSTROUTING -s '192.168.124.0/24' -o enp0s31f6 -j MASQUERADE
 
Last edited:
Hello,

so you own two public IP addresses now, the one your PVE has and another one for your VM?

Then I guess you have to add another bridge vmbr1 for the public network and move the public IP of your PVE there. You might also have to adjust your iptables rules then (like -o vmbr1 instead of -o enp0s31f6 )

See: https://forum.proxmox.com/threads/h...o-assign-one-ip-to-one-vm.117376/#post-508034

Kind regards,
Benedikt
 
Hello,

so you own two public IP addresses now, the one your PVE has and another one for your VM?

Then I guess you have to add another bridge vmbr1 for the public network and move the public IP of your PVE there. You might also have to adjust your iptables rules then (like -o vmbr1 instead of -o enp0s31f6 )

See: https://forum.proxmox.com/threads/h...o-assign-one-ip-to-one-vm.117376/#post-508034

Kind regards,
Benedikt

Won't you get an (mac address) abuse from Hetzner with this setup?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!