OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: BiTRiP on November 23, 2018, 11:59:16 am

Title: Specific websites via VPN
Post by: BiTRiP on November 23, 2018, 11:59:16 am
Hi all,

I have a OpenVPN to CyberGhost running on my OPNSense.
With help of aliases and rules I can define which hosts in my network goes outbound via this OpenVPN gateway.
Works flawlessly!

For the hosts in my LAN that uses regular WAN interface to go outside I want to define specific urls to go via VPN.
So I made a new alias (type URL/IP) called "SecretSites" where I fill in sites like 'checkip.org'
Then I made another alias (type hosts) called 'Filtered_Hosts' where I define ip's in my LAN that is gonna use this rule.
So I created a rule on the LAN interface, Protocol any, source 'Filtered Hosts', destination 'SecretSites' and gateway my VPN interface. The rest is default.

Somehow it's not working. If I go to checkip.org I still see my ISP ip and not VPN ip.
What can be wrong. This rule is also above my other LAN rules. Pull and push routes are disabled on VPN.

Hope you can help.

Thanks,
BiTRiP

(https://preview.ibb.co/eGktZq/Screen-Shot-2018-11-23-at-11-55-36.png)

(https://preview.ibb.co/kfYNuq/Screen-Shot-2018-11-23-at-12-06-07.png)
Title: Re: Specific websites via VPN
Post by: BiTRiP on November 24, 2018, 10:52:32 pm
Ok, I solved it.
it seems I had to make a NAT outbound rule also.
Now it's working, all traffic via WAN except for certain websites it is routed via VPN.

Thanks,
BiTRiP

(https://i.ibb.co/RYjsV1z/Screen-Shot-2018-11-24-at-22-51-43.png)

[edit]: Sorry, my solution was not working properly and doing wrong routing
Anyone else here routing specific sites to VPN only?