A lightweight, portable, and open-source PowerShell tool designed to enhance your system's privacy and security. It allows you to easily switch DNS providers and block advertisements/trackers system-wide using the Hosts file.
The modern, dark/light-themed UI allowing quick DNS toggling and host file updates.
- 🌐 DNS Manager: - Quickly switch between popular DNS providers (Google, Cloudflare, Quad9, AdGuard, OpenDNS).
- Easily revert to Default (DHCP) with a single click.
- 🚫 System-Wide AdBlocker: - Blocks ads, trackers, and malicious domains by modifying the Windows
hostsfile.- Aggregates blocklists from trusted sources (StevenBlack, AdAway, Yoyo).
- 🧠 Smart Merge Logic: - Preserves your data: If you have custom entries in your hosts file (e.g., for local development), this tool will not delete them. It only manages its own blocklist section.
- 🎨 Modern UI: - Clean WPF-based Graphical User Interface.
- Auto-Theme: Automatically adapts to your Windows Light or Dark mode settings.
- 📦 Portable: - Single
.ps1file. No installation required.
- OS: Windows 10 or Windows 11 (64-bit required).
- Permissions: Must be run as Administrator (required to modify Network settings and System files).
- Download the latest
AdBlockDNS.exefrom the Releases Page. - Double-click
AdBlockDNS.exeto run.
- Download the source code.
- Right-click
AdBlockDNS.ps1and select Run with PowerShell.- Note: If you encounter an Execution Policy error, run this command in PowerShell once:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
- Note: If you encounter an Execution Policy error, run this command in PowerShell once:
You may notice that some antivirus engines (such as Windows Defender, SentinelOne, or CrowdStrike) flag the .exe release of this tool as suspicious (e.g., Trojan:Win32/Wacatac, MachineLearning/Anomalous, or Generic.Malware).
This is a known False Positive.
This application is originally a PowerShell script converted into an executable (.exe) to make it easier to run. Modern antivirus "AI" and "Heuristic" engines often aggressively block any unsigned program that executes PowerShell commands internally, classifying them as "droppers" or "loaders" by default, even if the code itself is completely safe.
Since this project is open-source, you do not have to use the EXE file.
If your antivirus blocks the executable or if you prefer full transparency, you can run the source script directly:
-
Download the
.ps1file from this repository. -
Right-click the file and select Run with PowerShell.
-
(Note: You may need to enable script execution by running
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserin PowerShell once).
We provide the compiled .exe solely for convenience (icon support, double-click execution). The code logic is identical to the .ps1 script.
- DNS Changer: Uses native PowerShell commands (
Set-DnsClientServerAddress) to change the DNS servers of your active network adapter. - Hosts Blocker: - Downloads raw text lists of ad-servers.
- Parses and formats them into a Windows-compatible format.
- Appends them to
C:\Windows\System32\drivers\etc\hostsinside a tagged block. - Creates a backup (
hosts.bak) automatically before the first run.
This tool modifies system files (hosts) and network settings. While it includes safety features (backups and smart merging), use it at your own risk.
- Always ensure you have a system restore point if you are unsure.
- VPNs or other security software might conflict with DNS settings.
This project is licensed under the MIT License.
Created by @osmanonurkoc