Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Static Routes not being respected..? -SOLVED-
« previous
next »
Print
Pages: [
1
]
Author
Topic: Static Routes not being respected..? -SOLVED- (Read 731 times)
keropiko
Jr. Member
Posts: 81
Karma: 2
Static Routes not being respected..? -SOLVED-
«
on:
September 14, 2023, 11:16:09 am »
Hello,
i have installed opnsense 23.7.3 with multiwan setup.
Yesterday I have tried to setup a static route, towards a specific VPS IP xx.xx.xx.xx/32 and i have noticed that the route , although i can see in the status page correctly, when i do a traceroute from a LAN client towards the ip, the gateway used is not the one chosen at the static route.
«
Last Edit: September 14, 2023, 04:25:31 pm by keropiko
»
Logged
schmuessla
Newbie
Posts: 49
Karma: 1
Re: Static Routes not being respected..?
«
Reply #1 on:
September 14, 2023, 11:49:57 am »
I think your VPS has an IP outside your local network (public IP)?
If I understood it correctly so far the "System routes" are only obeyed if traffic is forwarded to the "default" gateway.
But since you implemented multiwan you changed your gateway from "default" to a WAN group, so traffic is routed via one of that gateways. To enforce picking the system routing table you then need to add a firewall rule to your lan group above the default LAN traffic which has destination VPS IP and gateway "default"
Logged
Seimus
Hero Member
Posts: 608
Karma: 59
Re: Static Routes not being respected..?
«
Reply #2 on:
September 14, 2023, 12:03:47 pm »
AS mentioned by @schmuessla,
You need to perform a Policy based routing, this is done within the Firewall rules where you need to specific a GW. What this will do basically is to permit traffic and forward it to the specified destination/gateway.
https://forum.opnsense.org/index.php?topic=11880.0
https://docs.opnsense.org/manual/how-tos/multiwan.html
https://docs.opnsense.org/manual/firewall.html#policy-based-routing
Regards,
S.
Logged
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
keropiko
Jr. Member
Posts: 81
Karma: 2
Re: Static Routes not being respected..?
«
Reply #3 on:
September 14, 2023, 04:25:11 pm »
Hello,
you are both correct. I completely "missed" the fact that it's a Public IP , so i should respect the policy routing instead of the default gateway.
thank you for your answers
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Static Routes not being respected..? -SOLVED-