OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: novel on November 27, 2023, 10:33:20 PM

Title: How to force web sites to using a specific gateway?
Post by: novel on November 27, 2023, 10:33:20 PM
Hello,

I would like to create a list with some web sites to use only specific gateway. I post the screenshot with configuraton. It doesn't work.

Does anyone know how to solve it?

Thank you


Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 09:18:35 AM
It is important to know that you route all traffic over VPN by default. I know this from the other thread, but others won't.

Alias and rule looks fine.
Just to note: you can add multiple sites into one alias without a need to create a rule for each.

Remember that only traffic from LAN will be routed over WAN, traffic from OPNsense won't.

Please post a screenshot of Firewall: Diagnostics: Aliases where you select your alias in the upper left.
Please also do a traceroute from a LAN client and post the output.

Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 09:23:26 AM
Please also post a screenshot of your LAN rules order.
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 09:54:11 AM
Quote from: tiermutter on November 28, 2023, 09:18:35 AM
It is important to know that you route all traffic over VPN by default. I know this from the other thread, but others won't.

Alias and rule looks fine.
Just to note: you can add multiple sites into one alias without a need to create a rule for each.

Remember that only traffic from LAN will be routed over WAN, traffic from OPNsense won't.

Please post a screenshot of Firewall: Diagnostics: Aliases where you select your alias in the upper left.
Please also do a traceroute from a LAN client and post the output.


I confirm that all traffic going to VPN. I want to exclude some sites to going there.

So, I have inside Content the site aliexpress.com. If beside to aliexpress put other sites other site works.

Some sites like aliexpress, youtube and other dont work....

traceroute show all traffic goes to vpn


Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 09:58:24 AM
traceroute output is missing  ::)
Is it destinated to one of the IPs listed in diagnostics or to another one?
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 10:02:38 AM
Quote from: tiermutter on November 28, 2023, 09:58:24 AM
traceroute output is missing  ::)
Is it destinated to one of the IPs listed in diagnostics or to another one?


I am sorry

update to alixpress
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 10:07:43 AM
this is a traceroute to google.com... you should do for aliexpress.com !
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 11:14:03 AM
Quote from: tiermutter on November 28, 2023, 10:07:43 AM
this is a traceroute to google.com... you should do for aliexpress.com !

I laready sent in previous message
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 11:21:39 AM
Your really, really should read more carefully!!!

Quote from: tiermutter on November 28, 2023, 09:18:35 AM
Remember that only traffic from LAN will be routed over WAN, traffic from OPNsense won't.

Quote from: tiermutter on November 28, 2023, 09:18:35 AM
Please also do a traceroute from a LAN client and post the output.

Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 11:31:57 AM
Quote from: tiermutter on November 28, 2023, 11:21:39 AM
Your really, really should read more carefully!!!

Quote from: tiermutter on November 28, 2023, 09:18:35 AM
Remember that only traffic from LAN will be routed over WAN, traffic from OPNsense won't.

Quote from: tiermutter on November 28, 2023, 09:18:35 AM
Please also do a traceroute from a LAN client and post the output.


I am very sorry...Please forgive me....

So, The route of aliexpress goes to vpn not change....But other sites goes well....It strange..
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 11:38:06 AM
Are you kidding me?  :o
Do it from A LAN CLIENT.
Do it NOT FROM OPNSENSE
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 11:47:24 AM
Quote from: tiermutter on November 28, 2023, 11:38:06 AM
Are you kidding me?  :o
Do it from A LAN CLIENT.
Do it NOT FROM OPNSENSE


from client It is
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 11:51:09 AM
Your Sense is not a LAN client, it is the VPN client.
But we need to see traffic from LAN client.
Or is there a second opnsense in your LAN?
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 11:54:49 AM
Quote from: tiermutter on November 28, 2023, 11:51:09 AM
Your Sense is not a LAN client, it is the VPN client.
But we need to see traffic from LAN client.
Or is there a second opnsense in your LAN?

192.168.1.1 is gatway of opnsense....I traceroute from my laptop 192.168.10.4 with enabled vpn...

Title: Re: How to force web sites to using a specific gateway?
Post by: Patrick M. Hausen on November 28, 2023, 11:55:11 AM
If the first hop in the tracerout is OPNsense, they are probably tracing from a different system  ;)
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 12:00:58 PM
Quote from: Patrick M. Hausen on November 28, 2023, 11:55:11 AM
If the first hop in the tracerout is OPNsense, they are probably tracing from a different system  ;)


I did traceroute aliexpress.com from my pc.....I did a new one right now
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 12:01:50 PM
ooops, I am very sorry...
I watched pics from smartphone and thought it was the systems name where traceroute was issued  :o
Title: Re: How to force web sites to using a specific gateway?
Post by: tiermutter on November 28, 2023, 12:18:58 PM
Quote from: novel on November 28, 2023, 11:54:49 AM
I traceroute from my laptop 192.168.10.4 with enabled vpn...

??? Your laptop is connected directly to your VPN provider? Or what does "enabled vpn" mean?
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 28, 2023, 12:47:31 PM
Quote from: tiermutter on November 28, 2023, 12:18:58 PM
Quote from: novel on November 28, 2023, 11:54:49 AM
I traceroute from my laptop 192.168.10.4 with enabled vpn...

??? Your laptop is connected directly to your VPN provider? Or what does "enabled vpn" mean?

As I said All traffick goes to vpn. ALL TRAFFIC. I want aliexpress.com and some other sites not going to vpn
Title: Re: How to force web sites to using a specific gateway?
Post by: novel on November 30, 2023, 09:52:08 AM

This problem happens only some sites, like youtube, aliexpress. If I use other sites with the same configuration works fine.

Thank you