Hello everyone
I need some help today regarding networking. Until now I had a working setup but now I have a new server which I want to share with someone.
My configuration for myself as the solo user is as follows:
The network forwards all traffic to my OPNSense firewall. Only port 8006 for Porxmox and 1-2 other ports are not. It works perfectly.
But now another public IP address is added, and another OPNSense firewall. The setup should simply be mirrored, only with the second public IP address.
I'm really getting desperate because I can't manage to configure it like this. I know there are two methods bridged and routed (brouter). I would prefer the first if that is possible. I can also generate a separate MAC address for the second IP address.
I tried the following configuration earlier, but unfortunately it did not work.
Any help is welcome. Thanks!
I need some help today regarding networking. Until now I had a working setup but now I have a new server which I want to share with someone.
My configuration for myself as the solo user is as follows:
Code:
auto lo
iface lo inet loopback
iface enp7s0 inet manual
auto vmbr0
iface vmbr0 inet static
address XXX.XXX.96.93/26
gateway XXX.XXX.96.65
bridge-ports enp7s0
bridge-stp off
bridge-fd 0
post-up sysctl -w net.ipv4.ip_forward=1
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 10.10.10.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp -m multiport ! --dport 41741 -j DNAT --to 10.10.10.1
# Public IP Configuration
auto vmbr1
iface vmbr1 inet static
address 10.10.10.0/31
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.10.1/31' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.1/31' -o vmbr0 -j MASQUERADE
# Proxmox - OPNSense Bridge
auto vmbr2
iface vmbr2 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
# VM Main Network Interface Bridge
The network forwards all traffic to my OPNSense firewall. Only port 8006 for Porxmox and 1-2 other ports are not. It works perfectly.
But now another public IP address is added, and another OPNSense firewall. The setup should simply be mirrored, only with the second public IP address.
I'm really getting desperate because I can't manage to configure it like this. I know there are two methods bridged and routed (brouter). I would prefer the first if that is possible. I can also generate a separate MAC address for the second IP address.
I tried the following configuration earlier, but unfortunately it did not work.
Code:
auto lo
iface lo inet loopback
iface enp7s0 inet manual
auto vmbr0
iface vmbr0 inet static
address XXX.XXX.96.93/26
gateway XXX.XXX.96.65
bridge-ports enp7s0
bridge-stp off
bridge-fd 0
post-up sysctl -w net.ipv4.ip_forward=1
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 10.10.10.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp -m multiport ! --dport 41741 -j DNAT --to 10.10.10.1
# Public IP Configuration
auto vmbr1
iface vmbr1 inet static
address 10.10.10.1/31
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.10.1/31' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.1/31' -o vmbr0 -j MASQUERADE
# Proxmox - OPNSense Bridge
auto vmbr2
iface vmbr2 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
# VM Main Network Interface Bridge
auto vmbr3
iface vmbr3 inet static
address XXX.XXX.96.90/26
bridge-ports enp7s0.2
bridge-stp off
bridge-fd 0
post-up sysctl -w net.ipv4.ip_forward=1
post-up ip link add link enp7s0 address 00:50:56:01:1D:21 dev enp7s0.2
post-up ip link set dev enp7s0.2 up
post-up iptables -t nat -A PREROUTING -i vmbr3 -p tcp -j DNAT --to 10.10.10.1
post-up iptables -t nat -A PREROUTING -i vmbr3 -p udp -j DNAT --to 10.10.10.1
pre-down ip link del enp7s0.2
# Public IP Configuration 2. Public IP
auto vmbr4
iface vmbr4 inet static
address 10.10.10.1/31
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.10.1/31' -o vmbr3 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.1/31' -o vmbr3 -j MASQUERADE
# Proxmox - OPNSense Bridge 2. Firewall
auto vmbr5
iface vmbr5 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
# Proxmox - OPNSense Bridge 2. Network
source /etc/network/interfaces.d/*
Any help is welcome. Thanks!