this post was submitted on 02 Apr 2026
147 points (98.7% liked)
Technology
83342 readers
2889 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you're using any DNS based blockers and the IP is in the hosts file it will still resolve, right? To block IP you would have to setup some completely different solution like a firewall.
Right, it won't ask the DNS server to resolve it, the solution requires a much more expensive blocking on firewall
Unless you run a pihole server
No, a machine won’t even contact the pihole if it finds the address in its hosts file. Hosts is step 0 for DNS, so if it finds something there it doesn’t even bother with contacting an external server (like a pihole).
i realized that the problem with an hosts file is the the system will completely bypass the dns server and directly contact the address. There is the need of something that enforces an IP address blocklist at the router level like opnsense