Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
policy based routing for locally originated traffic
« previous
next »
Print
Pages: [
1
]
Author
Topic: policy based routing for locally originated traffic (Read 2022 times)
ctr
Newbie
Posts: 20
Karma: 0
policy based routing for locally originated traffic
«
on:
March 14, 2020, 09:08:59 pm »
I'm having some problems to implement PBR for traffic destined from OPNsense itself.
My goal is to build two VPN tunnels (Wireguard) via two different links, but to the same destination IP. The decision making criteria which path to chose shall be the (source or destination) port.
It already starts strange, if I create two gateways (one for each path) and a static (host) route on each gateway only one is inserted into the kernel, strangely the one that is on the gateway with the *higher* priority although it reads "lower means more important". I assume this is only the case for default gateway, but how can I set the metric then?
When trying to divert traffic to a specific port (again, originated on the firewall itself) I can't find a working combination. Which firewall / nat rule am I supposed to enter traffic that is originated from the FW?
If I put it on the interface where it would leave as per the route the pbr routing works, but it is going out with the wrong source IP in that case...
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: policy based routing for locally originated traffic
«
Reply #1 on:
March 14, 2020, 09:11:47 pm »
Afaik pbr for local traffic is not possible with BSD
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
policy based routing for locally originated traffic