OPNsense Forum

English Forums => General Discussion => Topic started by: steven90 on August 31, 2024, 01:47:27 PM

Title: How to choose gateway for connections originating from the opnsense itself?
Post by: steven90 on August 31, 2024, 01:47:27 PM
Pretty much the title, how can i specify a particular gateway that the opnsense should use for connections from itself (like upstream dns requests or vpn connections)?

An example would be a setup with two physical WAN connections / gateways and a wireguard tunnel configured on the opnsense itself. Where could i set the physical WAN / ISP connection that should be used to establish the tunnel to the vpn server?

I know that for lan networks you can just create a firewall rule and then specify the gateway, but i couldnt find an interface / place to set firewall rules for traffic originating from the opnsense itself. And setting the rule on the wan interface doesnt really help ether bc this rule would have to be applied before the traffic hits the physical wan interface.

Thanks for any suggestions :)
Title: Re: How to choose gateway for connections originating from the opnsense itself?
Post by: Bob.Dig on August 31, 2024, 02:34:11 PM
Quote from: steven90 on August 31, 2024, 01:47:27 PM
Thanks for any suggestions
You can't.
Title: Re: How to choose gateway for connections originating from the opnsense itself?
Post by: steven90 on August 31, 2024, 02:49:26 PM
Thanks,
can you elaborate a little bit?, is there any particular reason for it or is it just not implemented?
I kinda have to get this working somehow even if it is not a clean solution :/

Shouldnt it be possible to edit the routing table to allways use a particular interface / gateway for connections to the vpn servers public ip?