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
N355 - i226-V | AQC113C | 16G | 500G - PROD

PRXMX
N5105 - i226-V | 2x8G | 512G - NODE #1
N100 - i226-V | 16G | 1T - NODE #2

Thank you @Seimus, will investigate this.