i set wg interface it was working fine without PBR
but after setiing the PBR and then rebooted the router it automatically set the default gateway to wg interface which i dont want to.
then i add in the network file below lines to avoid wg for default gateway.
To unset a WireGuard tunnel as default route, set the following to the appropriate section of your /etc/config/network:
For your WireGuard (client) config:
option route_allowed_ips '0'
after than i reboot now my wan interface is my default gateway but wg interface stopped.
Well if your default gateway is the WAN you should not need a policy for routing domains via the WAN as that already is the default unless ..... you have another policy which routes via the vpn.
Policies are routed in order so you could change the order of the policies so that the domain based routing comes first (in the GUI you can drag the config item)
Furthermore you can not have duplicate items in your PBR policies, only the first item which is hit will be routed.
For when you have other policies routing via the VPN.
Suppose you route your LAN client via the VPN but you do want some destination to go out via the WAN. In that case you make a policy to route that destination out via the WAN and make sure that policy comes first so before the policy which routes the LAN client via the VPN
For when you have other policies routing via the VPN.
Suppose you route your LAN client via the VPN but you do want some destination to go out via the WAN. In that case you make a policy to route that destination out via the WAN and make sure that policy comes first so before the policy which routes the LAN client via the VPN
[/quote]
ahh i got it now.
can you please also help me in one more thing.
the main reason im doing it because of whatsapp calling feature.
i live overseas and in my country everyone is using whatsapp calling and the country i'm residing in here only whatsapp calling is banned other than that whatsapp do work fine like texting sending pics videos.
i configured whatsapp/com/10.2.0.1 in dhcp and dns and also created policy as per instruction but still the calling feature doesnt work.
WhatsApp uses an in-house company content delivery network (CDN). The CDN delivers content to very edge of the network and is often hosted inside Internet Service Provider (ISP) networks.
Bottom line only using whatsapp.com will probably not suffice
The only thing you can do do is default route via the VPN and then only route domains you want or clients which do not use whatsapp route via the WAN