OPNsense Forum

English Forums => Virtual private networks => Topic started by: shrekfx on March 01, 2023, 04:29:37 PM

Title: Specific IP Routing via Wiregaurd
Post by: shrekfx on March 01, 2023, 04:29:37 PM
I have my router set up to route traffic out via wiregaurd to SurfShark.  That is working fine.  What I am trying to do is make it so traffic to specific IP address goes over my home ISP connection and not through the VPN tunnel.  For the life of me, I cannot get this part figured out.  I followed some guides online but nothing seems to work.  Either I end  up sending all traffic over vpn, all traffic over local ISP. 
Title: Re: Specific IP Routing via Wiregaurd
Post by: tiermutter on March 01, 2023, 07:57:39 PM
Traffic is routet to WG via policy based routing?
Then you need to
1. Create an alias with IPs you want to connect to via WAN
2. Create allow rule above default allow, set destination to your alias and GW to default / WAN.
Title: Re: Specific IP Routing via Wiregaurd
Post by: shrekfx on March 01, 2023, 08:00:44 PM
Awesome, i'll give that a try.  Can't remember if I did that and killed all my outgoing, but will give another shot. :)
Title: Re: Specific IP Routing via Wiregaurd
Post by: shrekfx on March 01, 2023, 08:02:26 PM
Quick question, does this go in the LAN rules I'm thinking or where exactly.
Title: Re: Specific IP Routing via Wiregaurd
Post by: tiermutter on March 01, 2023, 08:45:05 PM
Yes, its on the Interface where your clients are connected to... Can also be a VLAN
Title: Re: Specific IP Routing via Wiregaurd
Post by: shrekfx on March 01, 2023, 09:12:30 PM
Perfect. I think I got this working now. So simple. LOL Thanks again.
Title: Re: Specific IP Routing via Wiregaurd
Post by: tiermutter on March 01, 2023, 09:30:56 PM
Fine :)
Remember that thr alias also can contain MAC instead of IPs of your clients... Maybe working with MAC is better for some cases.