Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chromecast DNS to unblock-us via an iMac

I use unblock-us to access services that have this really stupid idea of IP-based positioning (hey guys, my IP does not mean anything!). This service (like many others) proxies your DNS traffic through their own servers so you can pretend to be anywhere on the planet. You only have to add their DNS-servers to your computers network settings or to your WIFI-router so all your devices can use it without changing their configuration.

Unfortunately, the chromecast has it's own google DNS configured and those google assholes don't let you change it or disable the feature. In the linked support thread, you can see how you can spoof the DNS traffic using iptables in your router, so the chromecast will actually talk to unblock-us instead.

My WIFI router is an oldish Apple Timecapsule and those things are quite 💩 when it comes to configuration. While they "just work" you can't access any of the internals or play around with iptables and comrades.

Luckily, I have an old iMac standing around, that I now use to spoof the DNS traffic that wants to talk to googles servers:

  • connect your computer via network cable, so you can share the WIFI
  • enable internet sharing in System Preferences > Sharing > Internet Sharing > Wi-Fi
  • connect your Chromecast to your new WIFI
  • make a small change to your macs routing table
sudo route add 8.8.8.8 208.122.23.23
# add host 8.8.8.8: gateway 208.122.23.23
sudo route add 8.8.4.4 208.122.23.22
# add host 8.8.4.4: gateway 208.122.23.22

After this change, all access to googles DNS servers with the IPs 8.8.8.8 and 8.8.4.4 will go to a DNS server of unblock-us (208.122.23.23 and 208.122.23.22 respectively).

If you to access a service that relies on IP based location like netflix.com, you should be pleased to see that it works as expected.

magic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment