Issue while setting up Public IP's + Internal Network

GermanUbuntu

Member
Jul 2, 2015
2
0
21
Hello guys.

I have some problems while setting up my server with 3 public IPv4 Adresses and an internal IPv4 Network.
The Internal Network is working, but using the external IP's is not working.

Host Configuration:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
  address <primary.ip.address>
  netmask 255.255.255.192
  gateway <primary.ip.address.gateway>

auto vmbr0
#private sub network
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 enp2s0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp2s0 -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

auto vmbr1
#public network
iface vmbr1 inet static
  address <primary.ip.address>
  netmask 255.255.255.192
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0
  up route add -host <ip.address.1>/26 dev vmbr1
  up route add -host <ip.address.2>/26 dev vmbr1
  up route add -host <ip.address.3>/26 dev vmbr1

Ubuntu Guest Configuration:
1602332546165.png
 
Hi,

The problem is you can't allocate an IP two times on different devs.
This way only the first routing rule will apply.

remove the IP and gateway from enp2s0.
Use it on vmbr1 with enp2s0 as bridge-port.
 

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!