Amalgamated hosts file
github.com
github.com
It's just a few lines in bash
#!/bin/bash
wget "http://adaway.org/hosts.txt" -O- > hosts
wget "http://www.malwaredomainlist.com/hostslist/hosts.txt" -O- >> hosts
wget "http://winhelp2002.mvps.org/hosts.txt" -O- >> hosts
wget "http://someonewhocares.org/hosts/zero/hosts" -O- >> hosts
wget "https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts" -O- >> hosts
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0" -O- >> hosts
mv hosts /etc/hosts
# Flush DNS cache as per your OS
# Mac OS X
# dscacheutil -flushcache
# Linux
# /etc/rc.d/init.d/nscd restart
# Linux with systemd:
# systemctl restart network.service
# Fedora Linux
# systemctl restart NetworkManager.service
Or in a windows batch file wget "http://adaway.org/hosts.txt" -O- > hosts
wget "http://www.malwaredomainlist.com/hostslist/hosts.txt" -O- >> hosts
wget "http://winhelp2002.mvps.org/hosts.txt" -O- >> hosts
wget "http://someonewhocares.org/hosts/zero/hosts" -O- >> hosts
wget "https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts" -O- >> hosts
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0" -O- >> hosts
move hosts %SystemRoot%\system32\drivers\etc\hosts
ipconfig /flushdnsOne thing to be careful of is auto-completion tools. Something like `ssh <tab><tab>` could dump the 30k list to your console as zsh + prezto does in my case.
To workaround this, I run a local DNS server (DNS masq) and provide it 'addn-hosts=/etc/hosts.blacklist' and place the blacklist there.