hosts
by StevenBlack
A consolidated and extensible hosts file that blocks ads, malware, and optionally porn and social media domains to enhance DNS security and network monitoring.
🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
Primary Use Case
This tool is primarily used to improve network security by blocking access to malicious, advertising, and optionally adult or social media domains via the hosts file. Security professionals, system administrators, and privacy-conscious users utilize it to automate DNS-based blocking and reduce exposure to threats and unwanted content.
- Consolidates hosts files from multiple well-curated sources
- Extensible with optional categories like porn and social media blocking
- Enhances DNS security by blocking malicious and ad domains
- Supports security automation through easy integration
- Regularly updated to maintain effectiveness
- Facilitates network monitoring by filtering unwanted traffic
Installation
- Download or clone the repository from GitHub: git clone https://github.com/StevenBlack/hosts.git
- Choose the desired hosts file variant (default, porn, social, etc.)
- Replace or merge the chosen hosts file with your system's hosts file (e.g., /etc/hosts on Linux/macOS or C:\Windows\System32\drivers\etc\hosts on Windows)
- Flush DNS cache or restart network services to apply changes
Usage
>_ git clone https://github.com/StevenBlack/hosts.gitClone the repository to obtain the latest hosts files.
>_ cat hosts/hosts > /etc/hostsReplace the system hosts file with the consolidated hosts file to block unwanted domains.
>_ cat hosts/hosts-porn > /etc/hostsUse the hosts file variant that includes blocking of pornographic domains.
>_ cat hosts/hosts-social > /etc/hostsUse the hosts file variant that includes blocking of social media domains.
- Integrate the hosts file into endpoint configurations to automate DNS-level blocking of malicious domains.
- Combine with network monitoring tools to correlate blocked domains with suspicious activity for enhanced threat detection.
- Use as part of a layered defense strategy to reduce attack surface by preventing access to known malicious or unwanted domains.
- Automate updates in CI/CD pipelines to ensure the latest threat intelligence is always enforced.
- Extend blocking categories dynamically based on organizational risk tolerance and policy changes.
Docs Take 2 Hours. AI Takes 10 Seconds.
Ask anything about hosts. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.
3 free chats per tool • Instant responses • No credit card
Related Tools
sherlock
sherlock-project/sherlock
Hunt down social media accounts by username across social networks
web-check
Lissy93/web-check
🕵️♂️ All-in-one OSINT tool for analysing any website
awesome-osint
jivoi/awesome-osint
:scream: A curated list of amazingly awesome OSINT
social-analyzer
qeeqbox/social-analyzer
API, CLI, and Web App for analyzing and finding a person's profile in 1000 social media \ websites
maigret
soxoj/maigret
🕵️♂️ Collect a dossier on a person by username from thousands of sites
GHunt
mxrch/GHunt
🕵️♂️ Offensive Google framework.
