Somebody tell me how to force Windows to use my chosen dns server rather than my isp

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Fritz

Well-Known Member
Apr 6, 2015
3,658
1,616
113
71
I'm using pi hole which in turn uses cloudflare. My windows boxes are using my isp in spite of the fact that i specify my pi hole. Pisses me off. Linux doesn't do this, it uses pi hole like it's supposed to.

TIA
 

elvisimprsntr

Active Member
May 9, 2021
168
78
28
Florida
If Windows using DNS over port 53 or 853 DNSoTLS (DoT), then you can add a firewall rule to redirect all outbound DNS requests to your own DNS server. If Windows is using DNSoHTTPS (DoH) , then you are hosed.
 

Falloutboy

Active Member
Oct 23, 2011
313
35
28
One thing which is not stated - Fixed IP or DHCP?
I have set up PiHole on my truenas server and I found two ways of doing things.
Using fixed IP set the DNS address of each machine to the PIHole on the server and then let the Server DNS point to cloudflare as opposed to the local DNS. in my case I was using google DNS 1.1.1.1 8.8.8.8 If i remember correctly.

Or

Set the DNS on the router to point back to the pihole server and then have it redirect traffic to the external DNS..

I don't know if this will sort your problem but it seemed to work for me.

I have tried this with:
Fritzbox 7490
Fritzbox 7590
Mikrotik HaP Ax3
 
  • Like
Reactions: Fritz

Fritz

Well-Known Member
Apr 6, 2015
3,658
1,616
113
71
One thing which is not stated - Fixed IP or DHCP?
I have set up PiHole on my truenas server and I found two ways of doing things.
Using fixed IP set the DNS address of each machine to the PIHole on the server and then let the Server DNS point to cloudflare as opposed to the local DNS. in my case I was using google DNS 1.1.1.1 8.8.8.8 If i remember correctly.

Or

Set the DNS on the router to point back to the pihole server and then have it redirect traffic to the external DNS..

I don't know if this will sort your problem but it seemed to work for me.

I have tried this with:
Fritzbox 7490
Fritzbox 7590
Mikrotik HaP Ax3
Thanks. All settings are manual except for the wireless clients. None of my servers or PCs are using DHCP. I was really surprised when I used a website that checks the DNS server you're using. Every Linux box is using pi hole as I want them to but every Windows boxes are using my ISP's server.

I found instructions on how to configure OPNsense to force all client to use pi hole but apparently it doesn't work, at least not with Windows.
 

louie1961

Active Member
May 15, 2023
500
236
43
Also be sure your windows browsers aren't using DNS over HTTPS. If they do, then it won't matter what you set windows to do, they will ignore it.
 
  • Like
Reactions: nabsltd and blunden

marcoi

Well-Known Member
Apr 6, 2013
1,657
380
83
Gotha Florida
in windows make sure your dhcp is getting the right ip for dns, which should either be the pihole or opnsense. Some browsers, like edge will use their own dns, so you need to check on settings and turn that off at browser level.

on opnsense you may need to go under System, Settings, General and adjust the dns. I use Unbound DNS within opnsense, so not 100 sure on how to setup external dns.

1767795356313.png
 

Fritz

Well-Known Member
Apr 6, 2015
3,658
1,616
113
71
Everything looks good in OPNsense and all my computer are using hard wired IP and DNS. It's only Windows that's ignoring my settings.
 

nabsltd

Well-Known Member
Jan 26, 2022
781
577
93
All settings are manual except for the wireless clients. None of my servers or PCs are using DHCP. I was really surprised when I used a website that checks the DNS server you're using.
If you are truly configuring your Windows IP networking manually (i.e., in the IPv4 properties box, you have "use the following IP address" and "use the following DNS server address" checked and have entered the right IP addresses), then Windows will use those entries, with the following caveats:
  1. Other network adapters can have DNS server settings, which are treated as global settings if more than one adapter is connected. Disable all adapters but the one you actually use.
  2. If you have more than one listed DNS server, it has been reported that Windows will sometimes keep querying the one that answered last, even if that is not the first one listed. This only matters if the first server(s) in the list aren't available at times.
You can easily check which DNS server is being queried by running "nslookup"...it will tell you what server it is using before it returns an answer. If it is returning the correct address (your pihole), then the answer likely lies with what other people have said...your browser is using DNS over HTTPS. Disable that and you should be fine.
 

Catlike

New Member
Mar 24, 2023
16
6
3
That site is answering the question you are asking. I would recommend you ignore that site for your investigation.

1. Do you see DNS requests from your windows hosts in your pihole logs.
1a. You could further test this by blocking a particular site within pihole then attempt to access it via your windows hosts

2. What DNS server is your pihole configured to fwd requests to?
 

Fritz

Well-Known Member
Apr 6, 2015
3,658
1,616
113
71
Pi Hole is using cloudflare. Never thought to check the logs . :rolleyes:
 
  • Haha
Reactions: marcoi