Dual public IP setup

qfet

New Member
Oct 27, 2022
3
0
1
Hi all,

I have a problem with my proxmox at Hetzner.
The system has two public IP addresses. My goal is to leave one IP address on the Proxmox, the second IP address should point to a pfSense.

At the moment I can reach the Proxmox without errors under the primary IP address of the system. The second IP address of the server I have also created in an interface and assigned exemplary to an Ubuntu VM to be able to check the functionality quickly.

The configuration currently looks like this:

cat /etc/network/interfaces on proxmox:

Bash:
auto lo
iface lo inet loopback

iface enp4s0 inet manual

auto vmbr0
iface vmbr0 inet static
  address 11.11.11.11 #primary public IP
  hwaddress aa:aa:aa  #hw Adress of the physical NIC
  netmask 255.255.255.192
  pointopoint 11.11.11.1 #Gateway IP provided by hetzner
  gateway 11.11.11.1 #Gateway IP provided by hetzner
  bridge_ports enp4s0
  bridge_stp off
  bridge_fd 1

auto vmbr1
iface vmbr1 inet static
  address 22.22.22.22 #2nd public IP
  netmask 255.255.255.192
  bridge_ports none
  bridge_stp off
  bridge_fd 0

In the next step, I give my Ubuntu test VM the network adapter vmbr1 and insert the virtual MAC that was provided to me by Hetzner.

The problem is that I do not get a network from my Ubuntu client. I configure the network on the Ubuntu client statically, the same as listed above.
Neither a ping, dnslookup or anything else works.

Any of you guys might have a tip for me?

Thanks!
 
I think it should suffice to just create one bridge, and then assign the bridge to the VMs and configure the respective IP addresses in the VMs itself.
 
Last edited:
Isn't there a gateway missing for the second network interface? This should be required for accessing internet. Also bridge_ports is missing a NIC.
hi, thanks for your help!

Yes, there is a second gateway missing. As soon as I try to add the address of the gateway, I get the following error in the Webgui:

Code:
Parameter verification failed. (400)
gateway: Default gateway already exists on interface 'vmbr0'.

The IP address of the gateway is the same for both interfaces. Should I just add it via /etc/network/interfaces?
 
hi, thanks for your help!

Yes, there is a second gateway missing. As soon as I try to add the address of the gateway, I get the following error in the Webgui:

Code:
Parameter verification failed. (400)
gateway: Default gateway already exists on interface 'vmbr0'.

The IP address of the gateway is the same for both interfaces. Should I just add it via /etc/network/interfaces?
Yes sorry, I was mistaken. I already edited my post but you were too fast so I will quote it here again:

I think it should suffice to just create one bridge, and then assign the bridge to the VMs and configure the respective IP addresses in the VMs itself. You can find a short summary here [1]

[1] https://iservit.ro/devops/multiple-ips-on-same-interface-proxmox/
 
  • Like
Reactions: qfet
Yes sorry, I was mistaken. I already edited my post but you were too fast so I will quote it here again:

I think it should suffice to just create one bridge, and then assign the bridge to the VMs and configure the respective IP addresses in the VMs itself. You can find a short summary here [1]

[1] https://iservit.ro/devops/multiple-ips-on-same-interface-proxmox/
Thanks again for that quick response.

I'm not sure I understand this correctly. My config would then look like this:

Bash:
auto lo
iface lo inet loopback

auto enp4s0
iface enp4s0 inet static
    address 11.11.11.11/26
    gateway 11.11.11.1

auto vmbr0
iface vmbr0 inet manual        
  bridge_ports enp4s0        
  bridge_stp off        
  bridge_fd 0
  bridge_fd 1

I don't really understand: don't I have to tell the proxmox that it has both public IP addresses on one interface or on two virtual interfaces?
 
You would configure the IP for proxmox in the bridge instead of the NIC, then pass the bridge through to the pfSense VM and configure the second public IP there in the pfSense VM.
 
PROXMOX MAIN IP /etc/network/interfaces

Code:
auto vmbr0
iface vmbr0 inet static
        address X.46.87.52/27
        gateway X.46.87.33
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

VM SECOND IP netplan .yaml
Code:
network:
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: false
      dhcp6: false
      optional: true
      addresses:
        - X.46.87.48/27
      nameservers:
        addresses: [1.1.1.1,8.8.8.8]
      routes:
        - to: default
          via: X.46.87.33
          metric: 100
          on-link: true
  version: 2
 

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!