Tagging traffic in OPNsense based on policy actions?

Started by jlficken, October 24, 2025, 05:21:24 AM

Previous topic - Next topic
October 24, 2025, 05:21:24 AM Last Edit: October 24, 2025, 05:23:09 AM by jlficken
Is this possible as it's something I used a lot in Untangle so that I could send say BitTorrent traffic out over a VPN without having to know the clients IP beforehand?

I'd tag the traffic and then Tunnel VPN would look for that tag and send the traffic out over an established tunnel.

Hi,

Zenarmor does not route specific traffic to designated destinations. Have you consulted this with OPNsense topics?

ZA is a NGFW/IPS/IDS, its function is to inspect and understand traffic and/or patterns. Routing as such is done on OPNsense.

what do you mean by tagging? How to you TAG the traffic? Where do you TAG it?

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

October 27, 2025, 04:42:00 PM #3 Last Edit: October 27, 2025, 04:44:13 PM by jlficken
Quote from: Seimus on October 26, 2025, 10:55:32 PMZA is a NGFW/IPS/IDS, its function is to inspect and understand traffic and/or patterns. Routing as such is done on OPNsense.

what do you mean by tagging? How to you TAG the traffic? Where do you TAG it?

Regards,
S.

In Untangle it's under the Events application that you can tag hosts when the traffic matches a specific criteria:



Then you go over to the Tunnel VPN application and create a rule to route that traffic over a specific tunnel (or any available tunnel) based off of the tag that was assigned in the above step.


You can route/block traffic in OPNsense using tags as well as I use that for the WireGuard Killswitch where a the rule that tells the traffic to go over the WireGuard tunnel (based on IP) sets a local tag of NO_WAN_EGRESS and then the KillSwitch rule checks for that tag and blocks the traffic if the Destination is the WAN rather than a tunnel.

I just don't see a way to have something like Zenarmor set a tag so that I can do something like Untangle does.