OPNsense Forum

English Forums => General Discussion => Topic started by: giuliopaci on August 22, 2025, 06:11:56 PM

Title: Multihomed bridge
Post by: giuliopaci on August 22, 2025, 06:11:56 PM
Hi all,
  I am new to opnsense and I am trying to configure a small network with it.

The ISP CPE modem is multihomed (public network X, with X gateway, public network Y, with Y gateway, private network Z, with Z gateway).

I have a opnsense router that I phisically connected to the ISP CPE modem using an interface and to an internal switch using another interface. The ISP CPE modem is connected to internet and X and Y network are configured to be accessible from outside.

I would like to allow devices on VLAN 1000, attached to the switch, to be able to use addresses from Y network and be accessible from outside and use an address from X network for the router. I also want to use port-forwarding on X router address.

I decided to create a bridge between VLAN 1000 and ISP CPE modem, and assign WAN to it.

So:

Current situation is:
- I can access port-forwarded services and Y devices from internet;
- I can access port-forwarded services from LEGACY;
- I can access Y devices from the router itself;
- I cannot access Y devices from LEGACY: packets get SNATed to the X router address, but they do not reach the device;
- I cannot access port-forwarded services from Y devices: packes get DNATed to the internal address of the services, but they do not reach the service.

I spent several hours trying to understand/solve the issue, but I was not able to find any solution yet.

What can be the issue?
Title: Re: Multihomed bridge
Post by: pfry on August 22, 2025, 08:10:52 PM
That's a rather unusual architecture. Three L3 services with no L2 partitioning? Yak!

For OPNsense -> Y, I assume that's a fixup on the modem side, but I'd have to look at the equipment to be sure.

For Legacy -> Y, it's probably a return-path issue (below).

For Y -> VLAN 100, I would assume that Y devices do not have specific routes to the VLAN 100 public NAT IPs, so packets are DNAT'd and sent to the Y gateway, which drops them (at some point). You could confirm this from packet capture (look at the destination MAC).

Ideally you could just configure a couple (additional) VRFs on the firewall and convince it that your WAN interface belongs to all three (a bit of a challenge, even on a real router). I can think of a few lousy solutions...

e.g. You could try assigning a virtual IP from Y to the firewall (bridge) and adding a static route to your Y test machine with the destination of the public NAT block and gateway of said virtual IP.

I figure I'll see if someone else here has a better solution. (Or if I'm simply dead wrong, dead.)