Hello, I am new to the forum with very little experience on Proxmox. This is also my first request for help. I have searched, consulted numerous subjects here and I admit either to being totally useless or totally ignorant or not knowing how to read the present subjects correctly, but today I encountered a difficulty which can seem, I am sure, very banal and certainly discussed dozens of times.
My configuration is as follows:
Proxmox is connected to the classic local network behind the Orange box (epn4s0)
A station is connected to a second network which I call "Private LAN" (enusb0)
I would like to carry out the following scenario which seems to be simple but which I cannot resolve:
All VMs in Proxmox and all stations in the "Private LAN" will only be able to access the Internet if the OPNSense VM is running.
Which of course means that if the OPNSense VM is shut down, no more VM or workstation will be able to go on the Internet.
Here's what works at the moment:
I've been trying different configurations in the /etc/network/interfaces file for hours and days and I can't achieve my goal.
I would appreciate a helping hand or a lead to understand what my errors are, as I am sure there must be several or even it may not be possible to achieve my wish.
For your help, here is my current etc/network/interfaces file :
My configuration is as follows:
- Server on a Minis Forum BD795S7 with 64GB of memory, 1 SSD drive of 1TB and 1 of 2TB;
- Proxmox version 9.0.11
- 1 physical network card at 1GB (enp4s0)
- 1 USB network card at 2.5GB (enusb0)
- VM OPNSense in version 25.7.5
- VM Debian 13 (Trixie)
Proxmox is connected to the classic local network behind the Orange box (epn4s0)
A station is connected to a second network which I call "Private LAN" (enusb0)
I would like to carry out the following scenario which seems to be simple but which I cannot resolve:
All VMs in Proxmox and all stations in the "Private LAN" will only be able to access the Internet if the OPNSense VM is running.
Which of course means that if the OPNSense VM is shut down, no more VM or workstation will be able to go on the Internet.
Here's what works at the moment:
- All VMs can go on the Internet
- All stations on the "Private LAN" can only go to the Internet if i change the "bridge-ports none" parameter in vmbr2 to "bridge-ports enusb0"
- If OPNSense is stopped, the VMs and "Private LAN" can still go on the Internet
I've been trying different configurations in the /etc/network/interfaces file for hours and days and I can't achieve my goal.
I would appreciate a helping hand or a lead to understand what my errors are, as I am sure there must be several or even it may not be possible to achieve my wish.
For your help, here is my current etc/network/interfaces file :
Bash:
auto lo
iface lo inet loopback
auto enp4s0
iface enp4s0 inet manual
post-up ip route add 192.168.10.0/24 via 10.120.0.1
auto enusb0
iface enusb0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.1.115/24
gateway 192.168.1.1
bridge-ports enp4s0
bridge-stp off
bridge-fd 0
#WAN Proxmox
auto vmbr1
iface vmbr1 inet static
address 10.120.0.1/30
bridge-ports none
bridge-stp off
bridge-fd 0
#WAN OPNSense
auto vmbr2
iface vmbr2 inet static
address 192.168.10.254/24
bridge-ports enusb0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.10.0/24' -o vmbr0 -j MASQUERADE
#LAN OPNSense
source /etc/network/interfaces.d/*