Problems with 2nd IP

Patrick-72

New Member
Aug 19, 2024
1
0
1
Hi,

i have Proxmox running with OPNSense and several other VM´s.

I can connect to Proxmox WEB, OPNSense and the VM´s behind the OPNSense.

Now i have a second IP for another single VM, but i´m not able to get it running.

This is my Network setting without the Second IP:

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

auto lo
iface lo inet loopback

iface lo inet6 loopback

#Physikalische Schnittstelle mit Haupt-IP
auto enp5s0
iface enp5s0 inet static
        address 123.89.12.17/32
        gateway 123.89.12.1
        up route add -net 123.89.12.17 netmask 255.255.255.255 gw 123.89.12.1 dev enp5s0
        post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up sysctl -w net.ipv4.ip_forward=1
        post-up iptables -t nat -A PREROUTING -i enp5s0 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 192.168.0.2
        post-up iptables -t nat -A PREROUTING -i enp5s0 -p udp -j DNAT --to 192.168.0.2

iface enp5s0 inet6 static
        address xxxxxxxxxxxxxxxx
        gateway fe80::1

iface eth0 inet manual

#Virtuelle Schnittstelle zur Verwendung der zweiten IP 123.89.12.11
auto vmbr0
iface vmbr0 inet static
        bridge-ports none
        bridge-stp off
        bridge-fd 0

#Virtuelle Schnittstelle zur OPNSense
auto vmbr1
iface vmbr1 inet static
        address 192.168.0.1/30
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/30' -o enp5s0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/30' -o enp5s0 -j MASQUERADE

#Virtuelle Schnittstelle für internes Netzwerk hinter der OPNSense (VM-Netzwerk)
auto vmbr2
iface vmbr2 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0

I tried every "solution" i found with google, but it won´t work.
How do i have to configure my Proxmox Network and the single VM for the 2nd IP?

Thanks
Patrick
 

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!