PBR using network settings, mwan3, etc. and our Wiki examples
Jonas Lochmann
openwrt at jonaslochmann.de
Mon Sep 8 23:51:45 PDT 2025
Am Sun, Sep 07, 2025 at 01:05:17PM -0600, schrieb Philip Prindeville via openwrt-devel:
> I was looking through the Wiki of a useful example of policy-based routing when one is multi-homed and you want to force a certain type of traffic out a particular interface.
>
> In my case, my SMTP traffic can only egress my non T-Mobile 5G for Business Internet connection because, despite claiming to be “5G for Business Internet”, they don’t consider rDNS or outbound SMTP to be essential business functions. Not sure how to do mTLS without certificate pinning to a DNS-based Subject Alternate Name (SAN) in X.509, but that’s a separate issue. I could pin to an IPv4 address but shouldn’t have to.
>
> Anyway, yes, I’m about to use mwan3 for multihoming but as far as my outbound SMTP traffic is considered I’m unfortunately single-homed.
>
> Anyone have some UCI for my network config that would accomplish this? Might be something useful to include in the PBR or routing sections of our Wiki.
I do something like this for wireguard traffic. So there are multiple tunnels using
different uplinks.
mwan3 already sets up the policy based routing. One just needs to use it. In case of
wireguard, one can set the fwmark directly. I don't know right now if the fw4 offers
setting the fwmarks.
Doesn't mwan3 offer setting a different "policy" (rule?) for smtp?
More information about the openwrt-devel
mailing list