OPNsense Forum

English Forums => Virtual private networks => Topic started by: marsk on September 23, 2026, 05:38:19 PM

Title: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: marsk on September 23, 2026, 05:38:19 PM

Hi,

To better understand what I was actually configuring in the OPNsense web UI, I created a logical diagram to help me.
The diagram (Attached file) shows how traffic flows through OPNsense when using a WireGuard VPN.

However, I need help verifying that the diagram is correct. Could you please verify it for me?

//marsk
Title: Re: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: meyergru on September 23, 2026, 06:01:06 PM
I think the main problem with the diagram is that it mixes different abstraction layers and then shows them as if they were consecutive hops in the packet path.

For example:


Very simplified, outbound traffic would look more like:

Client
-> VLAN
-> OPNsense VLAN interface
-> firewall / routing decision
-> WireGuard interface
-> WireGuard processing / peer selection / encryption
-> WAN interface
-> ISP / Internet
-> remote WireGuard peer

And incoming traffic:

remote WireGuard peer
-> Internet / ISP
-> WAN
-> firewall (encrypted UDP packet)
-> WireGuard processing / decryption
-> WireGuard interface
-> firewall / routing (inner IP packet)
-> VLAN interface
-> Client

So I would probably either draw a packet-flow diagram, or a configuration-object diagram showing the relationships between VLANs, interfaces, WireGuard instances and peers.

Mixing both concepts into one left-to-right chain is what makes the current diagram somewhat misleading.
Title: Re: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: marsk on September 24, 2026, 02:47:06 PM
Thx,
It is the configuration that is the problem, so it is probably better, as you said, to create a configuration diagram.

I have attached a flow diagram based on your suggestion, if I got it right.

See you.

//marsk
Title: Re: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: nero355 on September 24, 2026, 03:32:22 PM
Quote from: marsk on September 24, 2026, 02:47:06 PMif I got it right.
IMHO both attempts are OK and if it's enough for you as a reminder from time to time then that's perfectly fine, right ?!

I would personally create something like this :
- Draw a Client device.
- Then a huge circle representing OPNsense Firewalling.
- On the left edge of that circle one of your LAN Interfaces with the remark that it's also holds the Gateways for the VLANs and thus any VLAN Interfaces.
- Then a line from the Client device to the LAN Interface.
- Under that line Ethernet and again under it another one with any VLANs.
- On the right middle side of the circle one of your WireGuard interfaces.
- On the right edge of that circle one of your WAN Interfaces.
- Then a line representing let's say Ethernet over Fiber being used to connect to your ISP that is a small cloud outside the circle.
- In the middle of the circle the Routing/NAT Engine of OPNsense connected to every Interface except WAN.
- However you also need seperate "Just Routing" connections to the LAN and WireGuard Interface so maybe doing something seperate with NAT would be better ?!
- The Remote WireGuard Peer would be connected to the previously drawn small cloud outside the circle.
- And then a long VPN connection line all the way from the WireGuard Interface to the Remote WireGuard Peer.

And last but not least : Put the whole WireGuard processing/peer selection/encryption process in a seperate drawing and maybe connect it to the WireGuard Interface ?? :)



/"Quick Brainfart" which might have some mistakes or missing things in it...
Title: Re: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: marsk on September 24, 2026, 04:12:36 PM
Thanks nero355

Can you please just take some pen and paper and make a drawing of what you see in your mind .

You do not need to write the name of the components just visualize them with a box of any kind,
and attach a photo so I can try to make a logical diagram.

//marsk
Title: Re: Validating the WireGuard VPN Communication Flow in OPNsense
Post by: marsk on September 24, 2026, 04:26:32 PM
Not only understanding the flow is important for me.

I have worked as an infrastructure architect for many years on servers, virtualization, and storage,
not networks, and I am dyslexic.

Having a diagram gives me a grip of a system within three seconds, and the same goes for my colleagues and customers.
All documentation I write for systems I deploy always starts with a diagram.

So I really want to thank you for helping me.

I also think the documentation for OPNsense really could benefit from some diagrams for easier understanding.

//marsk