Hacker News new | ask | show | jobs
by whacker 3378 days ago
I think (on linux, at least), its better to implement this as a nss- module (/etc/nsswitch.conf). You can do things like lookup a hashtable, automatically update databases, etc without having to rewrite system config files.

Also this does not protect you from programs that perform their own dns lookups, and ignore /etc/hosts and /etc/resolv.conf entirely!

1 comments

What's the advantage of that? How does it protect you against programs that perform their own lookups?
oh nss modules wouldn't either. Perhaps intercepting and rewriting every dns request would be needed.