Ultimate-Hosts-Blacklist / Ultimate.Hosts.Blacklist

The Ultimate Unified Hosts file for protecting your network, computer, smartphones and Wi-Fi devices against millions of bad web sites. Protect your children and family from gaining access to bad web sites and protect your devices and pc from being infected with Malware or Ransomware.
MIT License
1.28k stars 156 forks source link

ipconfig /flushdns run over 24 hours #577

Closed StefanStrauss83 closed 4 years ago

StefanStrauss83 commented 4 years ago

Hello, Sorry, for my bad english.

I Use the Update Batch. ipconfig /flushdns run more than 24 hours with many CPU usage. In this Time the PC is offline. He build the local DNS Database in this Time? The PC has a SSD and 2,5GHz Processor und 8GB RAM. Whats the problem?

mitchellkrogza commented 4 years ago

Windows seems to really struggle with a very large hosts file. I'm really not sure why flushdns is hanging for so long though. Have you tried running update straight after reboot and not after the machine has been running for a long time?

StefanStrauss83 commented 4 years ago

After each restart, the laptop was offline for 1 hour and the DNS client service had CPU load. I have emptied the hosts again.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

spirillen commented 4 years ago

Hey @StefanStrauss83 you should take a look at the unbound for windows.... That is the right tool to manage this, hosts files are so 90's and for some weird reasons still a live.

You can find unbound at https://nlnetlabs.nl/projects/unbound/download/ and I have a small quick start config here https://www.mypdns.org/w/rpzunbound/ and here https://gitlab.com/my-privacy-dns/rpz-dns-firewall-tools/unbound and here https://gitlab.com/rpz-zones/toolbox/-/tree/master/unbound. Chose should be able to get you started, not to use hosts files as sources but partial RPZ. (Response Policy Zones are still not fully supported in unbound) but I have a lot of converted hosts files to RPZ here https://gitlab.com/my-privacy-dns/rpz-dns-firewall-tools/unbound/-/tree/master/nxdomain

Tell us what you think after trying it.

PS: Here is a short and dirty speed comparisons between hosts files vs a real recursor https://www.mypdns.org/w/performance_test_of_hosts_file_vs_dns-recursors/

NLnet Labs
Unbound - Download
⚡ Unbound
GitLab
Projects · My Privacy DNS Firewall / RPZ DNS firewall tools / Unbound
The zone files to be used with [Unbound](https://nlnetlabs.nl/projects/unbound/about/) From NLNetLabs
GitLab
unbound · master · RPZ Zones / toolbox
The toolbox is for various collections of scripts to help improve and complete the mission
GitLab
nxdomain · master · My Privacy DNS Firewall / RPZ DNS firewall tools / Unbound
The zone files to be used with [Unbound](https://nlnetlabs.nl/projects/unbound/about/) From NLNetLabs
⚡ Performance Test of Hosts File vs. Dns-recursors
georgengelmann commented 4 years ago

Hello

I tried using the .bat file on Windows 10 - then DNS client CPU usage jumped to 10-20%, network was blocked

I rebooted in safe-mode - copy the hosts.original to hosts (I could not change the hosts file in normal boot mode, because the DNS client was using it and it's not possible to stop the DNS client in normal mode)

The line-breaks are not Windows line-breaks, but that's not the issue here (I tried changing them): Windows can't handle large hosts files. Some added hosts are fine: SpyBot immunization adds 500kB - 10MB is too big for DNS

You should probably remove the Windows .bat file or add a warning.

spirillen commented 4 years ago

Hey @georgengelmann In case you just won't try to install the better, faster and safer approach of installing a DNS recursor like the unbound for windows, I would recommend you to have a look it @ScriptTiger's script https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate/issues/23

For your note about the size of this hostfile will brake most microsoft product, I agree with you.

@funilrys could you point me to a good line in the README.md where to put a note on this, and I will try to find the time for it while my bad disk is restoring :unamused:

funilrys commented 4 years ago

Please prefer our DNS Server (#590).

Closing.