If, like me, you don’t trust your ISP’s nameservers to be patched and working correctly (or for them to sell you out to advertisers by redirecting broken links or whatever), then here’s a quick solution to setting up your box to use OpenDNS servers instead.
Using this assumes three things though:
- You don’t have anything in /etc/conf.d/net
- You are a DHCP client
- You are using sys-apps/openrc
Anything besides that, you’ll just have to figure it out yourself, though the commands should be close. BTW, someone correct me if I’m wrong.
Add this to /etc/conf.d/net:
dhcp_eth0=”nodns”
dns_servers_eth0=”208.67.222.222 208.67.220.220″
If eth0 is not your primary NIC, then you’d have to change that.
Then just restart net.eth0 (/etc/init.d/net.eth0 restart) and you should see this in /etc/resolv.conf:
nameserver 208.67.222.222
nameserver 208.67.220.220
You realize that opendns redirects invalid domains to their own search page and sells the tracking data just like the ISPs right?
Yah I realized that right after I posted it. Ah, well. Still beats insecure DNS servers.
It only redirects if you check that option, otherwise you get the good old page not found.