# VPN Client - Policy based on target domain/IP - Wrong interpretation of use/not use

**URL:** <https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452>\
**Category:** VPN, DNS, Leaks\
**Created:** [January 19, 2025, 2:38pm UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452 "2025-01-19T14:38:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dieterlind](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/a88e57/32.png) [@dieterlind](https://forum.gl-inet.com/u/dieterlind)\
**Post date:** [January 19, 2025, 2:38pm UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/1 "2025-01-19T14:38:21Z")

</div>

Hello!

I am somehow confused:  
I want to use the VPN policy based on the target Domain or IP like this (first two lines commented with #, 3rd+4th line with domain-name) (with "Use VPN" set):

 ![image](https://forum-static.gl-inet.com/original/3X/f/1/f12a545f7862904b1cbb4175dd84de7af2a6756b.png)

With this configuration tcpdump indicates that the whole traffic is going via normal wan-interface.

When changing to "Do not use VPN" traffic seems to run via ovpn 10.100.0.2.

 ![image](https://forum-static.gl-inet.com/original/3X/2/b/2b2b11fe940836775dc5708666472ac80d5780ec.png)

After some while one out of two devices change routing again to normal wan-interface without VPN, the other one stays on VPN (in the beginning both go via VPN.

 ![image](https://forum-static.gl-inet.com/original/3X/f/6/f6f6001e492e3dc2bfec71e2c0ed74d6a5717508.png)

Any ideas what I am doing wrong here??

---

<div class="post-metadata">

**Author:** ![admon](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/admon/32/32880_2.png) [@admon](https://forum.gl-inet.com/u/admon)\
**Post date:** [January 19, 2025, 2:48pm UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/2 "2025-01-19T14:48:14Z")

</div>

The VPN policy is based on the DNS server. A device needs to request DNS entries via the DNS server of the router (so no DoH/DoT on the device itself!) to make them work.

Check if the devices are using the internal DNS of your router instead of some other.

---

<div class="post-metadata">

**Author:** ![dieterlind](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/a88e57/32.png) [@dieterlind](https://forum.gl-inet.com/u/dieterlind)\
**Post date:** [January 19, 2025, 2:49pm UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/3 "2025-01-19T14:49:51Z")

</div>

Hello!

Thanks for your fast reply.  
Can you give me a hint on how I can check this??

Thanks!

---

<div class="post-metadata">

**Author:** ![dieterlind](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/a88e57/32.png) [@dieterlind](https://forum.gl-inet.com/u/dieterlind)\
**Post date:** [January 20, 2025, 6:42am UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/4 "2025-01-20T06:42:20Z")

</div>

Hello!

Regarding DNS: All my devices receive their network connection information by DHCP. So they all have the gl.inet-Router as DNS-Server.

---

<div class="post-metadata">

**Author:** ![lisbonc1987](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@lisbonc1987](https://forum.gl-inet.com/u/lisbonc1987)\
**Post date:** [January 20, 2025, 5:19pm UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/5 "2025-01-20T17:19:20Z")

</div>

Are you trying to exclude certain domain/ip from using VPN? If so, I did this recently. Since I post on Offerup a lot, I wanted offerup to be excluded in VPN since offerup doesn't allow the use of VPN. When I set Policy based on target domain/IP, I leave it at Do Not Use VPN. I entered offerup's domain and IP on each line. I then go to AdGuard Home (if you have it set up) then Filters\> DNS Rewrites. I put offerup's IP there and I was able to access offerup while the rest still use VPN.

Not sure if that's what you are after but if it is, hope it helps.

---

<div class="post-metadata">

**Author:** ![dieterlind](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/a88e57/32.png) [@dieterlind](https://forum.gl-inet.com/u/dieterlind)\
**Post date:** [January 21, 2025, 8:50am UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/6 "2025-01-21T08:50:32Z")

</div>

No, I just want to use VPN for certain domains/IPs, the rest should go directly.  
AdGuard I am not using at the moment.

---

<div class="post-metadata">

**Author:** ![lisbonc1987](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@lisbonc1987](https://forum.gl-inet.com/u/lisbonc1987)\
**Post date:** [January 21, 2025, 11:35am UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/7 "2025-01-21T11:35:05Z")

</div>

Use customize routing rules instead. Then enter the ip you want to use VPN on. Then only those ip you entered will use vpn, the rest are not

---

<div class="post-metadata">

**Author:** ![dieterlind](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/a88e57/32.png) [@dieterlind](https://forum.gl-inet.com/u/dieterlind)\
**Post date:** [January 28, 2025, 11:24am UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/8 "2025-01-28T11:24:58Z")

</div>

No, I just want to use VPN for certain domains/IPs, the rest should go directly.  
AdGuard I am not using at the moment.

---

<div class="post-metadata">

**Author:** ![bruce](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bruce/32/35649_2.png) [@bruce](https://forum.gl-inet.com/u/bruce)\
**Post date:** [October 29, 2025, 11:42am UTC](https://forum.gl-inet.com/t/vpn-client-policy-based-on-target-domain-ip-wrong-interpretation-of-use-not-use/53452/9 "2025-10-29T11:42:43Z")

</div>


