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


rezpower

Well-known member
Member
VIP
Local time
10:50 AM
Posts
331
OS
Windows 11
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

System One

  • OS
    Windows 11
    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™ 3080 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

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.3775
    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
    1tb Solidigm m.2 nvme+256gb SKHynix m.2 nvme /External drives 512gb Samsung m.2 sata+1tb Kingston m2.nvme+ 4gb Solidigm 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
  • Operating System
    Windows 10 Pro 22H2 19045.3930
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 9020
    CPU
    i7-4770
    Memory
    24 gb
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    256 gb Toshiba BG4 M.2 NVE SSB and 1 tb hdd
    PSU
    500w
    Case
    MT
    Cooling
    Dell factory
    Mouse
    Logitech wireless
    Keyboard
    Logitech wired
    Internet Speed
    still not telling
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium
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

System One

  • OS
    Windows 11 Home
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 8600G (07/24)
    Motherboard
    ASROCK B650M-HDV/M.2 3.20 (07/24)
    Memory
    2x32GB Kingston FURY DDR5 5600 MHz CL36 @5200 CL40 (07/24)
    Graphics Card(s)
    ASROCK Radeon RX 6600 Challenger D 8G @60FPS (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 (04/23)
    Internet Speed
    500/100 Mbps via RouterOS (05/21) & TCP Optimizer
    Browser
    Edge & Brave for YouTube & LibreWolf for FB
    Antivirus
    NextDNS blocking 99% TLDs
    Other Info
    Backup: Hasleo Backup Suite (PreOS)
    Headphones: Sennheiser RS170 (09/10)
    Phone: Samsung Galaxy Xcover 7 (02/24)
    Chair: Huzaro Force 4.4 Grey Mesh (05/24)
    Notifier: Xiaomi Mi Band 9 Milanese (10/24)
    2nd Monitor: AOC G2460VQ6 @75Hz (02/19)
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

System One

  • OS
    Windows 11
    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™ 3080 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

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.3775
    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
    1tb Solidigm m.2 nvme+256gb SKHynix m.2 nvme /External drives 512gb Samsung m.2 sata+1tb Kingston m2.nvme+ 4gb Solidigm 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
  • Operating System
    Windows 10 Pro 22H2 19045.3930
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 9020
    CPU
    i7-4770
    Memory
    24 gb
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    256 gb Toshiba BG4 M.2 NVE SSB and 1 tb hdd
    PSU
    500w
    Case
    MT
    Cooling
    Dell factory
    Mouse
    Logitech wireless
    Keyboard
    Logitech wired
    Internet Speed
    still not telling
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium

Latest Support Threads

Back
Top Bottom