Skip to content

Instantly share code, notes, and snippets.

@phoet
Last active August 29, 2015 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phoet/c49d5afebc59275aa40b to your computer and use it in GitHub Desktop.
Save phoet/c49d5afebc59275aa40b to your computer and use it in GitHub Desktop.
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