Solved Is there anyway to block some domain (dns) with Windows?


rezpower

Well-known member
Member
VIP
Local time
8:49 AM
Posts
402
OS
Windows
Let me explain what I have in mind...I want to be able to block a device on my home network from accessing some domains.
The idea is to enable Hotspot wifi connection on my windows 11 and connect to it with my device, instead of having the device
directly connected to my router. Then find a way to block the domains I want on my windows. So that the device connected to
my hotspot will not be able to connect to those domains.

Do you think that this is possible to do?!
Mostly what I was able to find on the subject was to us pi-hole with a raspberry pi which I don't have. I would really prefer getting
this done with my windows PC if possible.
 

My Computer My Computer

At a glance

WindowsIntel i7-12800HX32 GB DDR5 4800 MHz dual-channelNVIDIA® GeForce RTX™ 3070 Ti
OS
Windows
Computer type
Laptop
Manufacturer/Model
Lenovo Legion 7i
CPU
Intel i7-12800HX
Memory
32 GB DDR5 4800 MHz dual-channel
Graphics Card(s)
NVIDIA® GeForce RTX™ 3070 Ti
Sound Card
Steinberg UR44
Hard Drives
1 TB SSD (M.2 NVMe PCIe 4.0 x4
2 TB SSD Samsung 980 PRO NNMe
Browser
Firefox
Antivirus
Windows Defender + Malwarebytes
You can block domains using the hosts file or windows firewall.


There are youtube videos on this as well. This one works with hosts file.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
You can try NextDNS just setup DNS as DOH to be able to use a custom setup. Change dohtemplate accordingly.
Code:
reg add "HKLM\System\CurrentControlSet\Services\Dnscache\Parameters" /v "EnableAutoDoh" /t REG_DWORD /d "2" /f
netsh dns add encryption server=45.90.28.91 dohtemplate=https://dns.nextdns.io/userID/devicenane autoupgrade=yes udpfallback=no
netsh dns add encryption server=45.90.30.91 dohtemplate=https://dns.nextdns.io/userID/devicename autoupgrade=yes udpfallback=no
You can use the extension to add multiple domains at once.
 

Attachments

  • capture_05182022_080747.jpg
    capture_05182022_080747.jpg
    79 KB · Views: 5
Last edited:

My Computer My Computer

At a glance

Home2FH2CanAMD Ryzen 5 8600G (07/24)2x32GB Kingston FURY DDR5 5600 MHz CL36 @5200...ASROCK Radeon RX 6600 Challenger D 8G @48FPS ...
OS
Home2FH2Can
Computer type
PC/Desktop
CPU
AMD Ryzen 5 8600G (07/24)
Motherboard
ASROCK B650M-HDV/M.2 (07/24) BIOS 4.43 AGESA ComboAM5 1.3.0.1b Patch A (07/26)
Memory
2x32GB Kingston FURY DDR5 5600 MHz CL36 @5200 CL40 (07/24)
Graphics Card(s)
ASROCK Radeon RX 6600 Challenger D 8G @48FPS (08/24)
Sound Card
Creative Sound BlasterX AE-5 Plus (05/24)
Monitor(s) Displays
24" Philips 24M1N3200ZS/00 (05/24)
Screen Resolution
1920×1080@165Hz via DP1.4
Hard Drives
Kingston KC3000 NVMe 2TB (05/24)
ADATA XPG GAMMIX S11 Pro 512GB (07/19)
PSU
Seasonic Core GM 550 Gold (04/24)
Case
Fractal Design Define 7 Mini with 3x Noctua NF-P14s/12@555rpm (04/24)
Cooling
Noctua NH-U12S with Noctua NF-P12 (04/24)
Keyboard
HP Pavilion Wired Keyboard 300 (07/24) + Rabalux 76017 Parker (01/24)
Mouse
Logitech M330 Silent Plus (07/26)
Internet Speed
500/100 Mbps via RouterOS (05/21) & TCP Optimizer
Browser
Edge, Brave for YouTube, LibreWolf for FB
Antivirus
NextDNS blocking 1/3 Traffic
Other Info
Phone: Motorola Moto G86 (02/26)
Backup: Hasleo Backup Suite (PreOS)
Headphones: Sennheiser RS170 (09/10)
Chair: Huzaro Force 4.4 Grey Mesh (05/24)
Notifier: Xiaomi Mi Band 9 Milanese (10/24)
FlexCore USB-C 3.2 Gen 1 (M) to LAN (F) (08/25)
You can try NextDNS just setup DNS as DOH to be able to use a custom setup. Change dohtemplate accordingly.
Code:
reg add "HKLM\System\CurrentControlSet\Services\Dnscache\Parameters" /v "EnableAutoDoh" /t REG_DWORD /d "2" /f
netsh dns add encryption server=45.90.28.91 dohtemplate=https://dns.nextdns.io/userID/devicenane autoupgrade=yes udpfallback=no
netsh dns add encryption server=45.90.30.91 dohtemplate=https://dns.nextdns.io/userID/devicename autoupgrade=yes udpfallback=no
You can use the extension to add multiple domains at once.
After trying many different things this is the best solution which I finally adapted and works great. Thanks for the precious help :)
 

My Computer My Computer

At a glance

WindowsIntel i7-12800HX32 GB DDR5 4800 MHz dual-channelNVIDIA® GeForce RTX™ 3070 Ti
OS
Windows
Computer type
Laptop
Manufacturer/Model
Lenovo Legion 7i
CPU
Intel i7-12800HX
Memory
32 GB DDR5 4800 MHz dual-channel
Graphics Card(s)
NVIDIA® GeForce RTX™ 3070 Ti
Sound Card
Steinberg UR44
Hard Drives
1 TB SSD (M.2 NVMe PCIe 4.0 x4
2 TB SSD Samsung 980 PRO NNMe
Browser
Firefox
Antivirus
Windows Defender + Malwarebytes

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
Back
Top Bottom