Skip to content

Instantly share code, notes, and snippets.

@carlhoerberg
Last active January 7, 2017 22:06
Show Gist options
  • Save carlhoerberg/c18e237f5e4ecbb35020 to your computer and use it in GitHub Desktop.
Save carlhoerberg/c18e237f5e4ecbb35020 to your computer and use it in GitHub Desktop.
How to see Netflix on a Chromecast abroad by tethering and redirecting all DNS traffic in OS X

Chromecast always uses Google's DNS servers so you can't just change DNS server on your local network, you have to redirect all DNS requests to another server. This guide will help you do so with a OS X computer and a phone.

Requirements for this guide:

  • Phone with tethering
  • OS X >=10.9
  • unblock-us.com or another DNS resolver

Steps:

  1. Tethering your computer through your phone, eg. connect to your wifi, and tether with USB.
  2. Change the DNS setting on your computer for the tethered connection to unblock-us.com's.
  3. Write /etc/pf.anchors/redirectdns (see below), where en3 is the internet connection (your phone), and 208.122.23.23 is unblock-us.com DNS servers.
  4. Modify /etc/pf.conf, as shown below.
  5. Execute sudo pfctl -vf /etc/pf.conf to apply.
  6. Enable Internet sharing in OS X, share the tethering connection over Wifi.
  7. Setup your Chromecast to connect to your computer's wifi.
  8. Goto netflix.com on your computer and choose a movie, choose "Show on Chromecast".
  9. Enjoy!
# /etc/pf.conf
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
# redirect all dns traffic
rdr-anchor "redirectdns"
load anchor "redirectdns" from "/etc/pf.anchors/redirectdns"
# redirect all dns traffic
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
# /etc/pf.anchors/redirectdns
rdr on en3 inet proto udp to any port 53 -> 208.122.23.23 port 53
rdr on en3 inet proto tcp to any port 53 -> 208.122.23.23 port 53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment