Skip to content

Instantly share code, notes, and snippets.

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
# add host gateway
sudo route add
# add host gateway

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

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


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