Static route by ASN

Started by fathibn, January 21, 2025, 04:57:38 PM

Previous topic - Next topic
Hi,
I have twwo internet connections to two different ISPs and would like to direct outgoing traffic to some ASN (mainly facebook, instagram, ...) to go through a given one of them.
I added an alias to the desired destination facebook_Meta_asn_32934_n_63293 and would like to add a static route to that ASN, so non production traffic goes through a given ISP.
Couldn't find how to do it.
Could someone help me please ?
TIA.
Fathi B.N.

Did you try using PBR?

As per my knowledge Static routes do not allow Alias as object for destination.

FW rule with destination of the ASN Alias and pointing to a specific GW?
https://docs.opnsense.org/manual/aliases.html#bgp-asn
https://docs.opnsense.org/manual/firewall.html#policy-based-routing

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