Skip to content

Instantly share code, notes, and snippets.

@esamattis
Last active May 5, 2022 17:45
Show Gist options
  • Select an option

  • Save esamattis/9789586 to your computer and use it in GitHub Desktop.

Select an option

Save esamattis/9789586 to your computer and use it in GitHub Desktop.

Revisions

  1. esamattis revised this gist Jan 13, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,7 @@ Since iptables rules are not persistent we must add them to the `nat-start` hook

    ```
    cat > /jffs/scripts/nat-start <<EOF
    #!/bin/sh
    iptables -t nat -A PREROUTING -s <CHROMECAST-IP>/32 -d 8.8.4.4 -p udp --dport 53 -j DNAT --to <ROUTER-IP>
    iptables -t nat -A PREROUTING -s <CHROMECAST-IP>/32 -d 8.8.8.8 -p udp --dport 53 -j DNAT --to <ROUTER-IP>
    EOF
  2. esamattis revised this gist Apr 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,7 @@ Make the hook executable

    chmod +x /jffs/scripts/nat-start

    Reboot the router or execute the `nat-start` hook manually.
    Reboot the router or execute the hook manually.

    ## Links

  3. esamattis revised this gist Apr 8, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,8 @@ Replace `<UNBLOCK-DNS-SERVER-IP>`with the correct ip address.

    This way only the dns queries for netflix.com will go to the unblocking dns provider.

    Reboot the router or just dnsmasq.

    ### Chromecast

    Chromecast has hard coded DNS servers to 8.8.8.8 and 8.8.4.4. Luckily we can use simple iptables rules to redirect Chromecast DNS queries back to our router.
    @@ -35,9 +37,7 @@ Make the hook executable

    chmod +x /jffs/scripts/nat-start


    After changes you should reboot the router or manually restart dnsmasq and execute the `nat-start` hook.

    Reboot the router or execute the `nat-start` hook manually.

    ## Links

  4. esamattis revised this gist Apr 8, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ Replace `<UNBLOCK-DNS-SERVER-IP>`with the correct ip address.

    This way only the dns queries for netflix.com will go to the unblocking dns provider.

    ## Chromecast
    ### Chromecast

    Chromecast has hard coded DNS servers to 8.8.8.8 and 8.8.4.4. Luckily we can use simple iptables rules to redirect Chromecast DNS queries back to our router.

    @@ -35,7 +35,8 @@ Make the hook executable

    chmod +x /jffs/scripts/nat-start

    and reboot the router.

    After changes you should reboot the router or manually restart dnsmasq and execute the `nat-start` hook.


    ## Links
  5. esamattis revised this gist Apr 8, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@ Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for

    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tablets, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

    ## Enable JFFS partition
    ## Prerequisites

    From [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)
    Enable JFFS partition and SSH login from [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)

    ## Configure dnsmasq

  6. esamattis revised this gist Apr 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tables, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.
    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tablets, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

    ## Enable JFFS partition

  7. esamattis revised this gist Apr 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.
    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tables, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

    ## Enable JFFS partition

  8. esamattis revised this gist Apr 8, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -2,15 +2,15 @@

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U router for example.
    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

    ## Enable JFFS partition

    From [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)

    ## Configure dnsmasq

    Ssh into the router and type
    Login to the router using SSH and type

    echo "server=/netflix.com/<UNBLOCK-DNS-SERVER-IP>" > /jffs/configs/dnsmasq.conf.add

  9. esamattis revised this gist Apr 1, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -10,11 +10,11 @@ From [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advan

    ## Configure dnsmasq

    Ssh into the machine and type
    Ssh into the router and type

    echo "server=/netflix.com/<UNBLOCK-DNS-SERVER-IP>" > /jffs/configs/dnsmasq.conf.add

    Replace `<UNBLOCK-DNS-SERVER-IP>`with the ip address correct ip address.
    Replace `<UNBLOCK-DNS-SERVER-IP>`with the correct ip address.

    This way only the dns queries for netflix.com will go to the unblocking dns provider.

  10. esamattis revised this gist Mar 26, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,13 @@

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U for example.
    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U router for example.

    ## Enable JFFS partition

    From [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)

    ## dnsmasq config
    ## Configure dnsmasq

    Ssh into the machine and type

  11. esamattis revised this gist Mar 26, 2014. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS trafic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U for example.
    But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U for example.

    ## Enable JFFS partition

    @@ -16,9 +16,11 @@ Ssh into the machine and type

    Replace `<UNBLOCK-DNS-SERVER-IP>`with the ip address correct ip address.

    This way only the dns queries for netflix.com will go to the unblocking dns provider.

    ## Chromecast

    Chromecast has hard coded DNS servers to 8.8.8.8 and 8.8.4.4. Luckily we can use simple iptables rules to redirect Chromecast DNS requests back to our router.
    Chromecast has hard coded DNS servers to 8.8.8.8 and 8.8.4.4. Luckily we can use simple iptables rules to redirect Chromecast DNS queries back to our router.

    Since iptables rules are not persistent we must add them to the `nat-start` hook

  12. esamattis revised this gist Mar 26, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ But I don't want to direct all my DNS trafic to them and I'm too lazy to manuall

    ## Enable JFFS partition

    From [http://<ROUTER-IP>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)
    From [http://\<ROUTER-IP\>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)

    ## dnsmasq config

  13. esamattis revised this gist Mar 26, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ But I don't want to direct all my DNS trafic to them and I'm too lazy to manuall

    ## Enable JFFS partition

    From <http://<ROUTER-IP>/Advanced_System_Content.asp>
    From [http://<ROUTER-IP>/Advanced_System_Content.asp](http://<ROUTER-IP>/Advanced_System_Content.asp)

    ## dnsmasq config

  14. esamattis revised this gist Mar 26, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -36,8 +36,10 @@ Make the hook executable
    and reboot the router.


    ## Source
    ## Links

    Tomato && DD-WRT documentation on Ad-free Time! <https://adfreetime.com/get-started/chromecast/>

    dnsmasq on Ubuntu <http://askubuntu.com/questions/419099/how-to-use-custom-dns-server-for-selected-domains-only/419100#419100>

    [merlin]: https://github.com/RMerl/asuswrt-merlin
  15. esamattis revised this gist Mar 26, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Transparent Netflix only region unblock with Asuswrt Merlin

    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS trafic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U for example.
  16. esamattis renamed this gist Mar 26, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md → unblockdns.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS trafic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using [Asuswrt Merlin][merlin]. It's custom router firmware which can be used on the Asus RT-N66U.
    But I don't want to direct all my DNS trafic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's custom router firmware which can be used on the Asus RT-N66U for example.

    ## Enable JFFS partition

  17. esamattis created this gist Mar 26, 2014.
    41 changes: 41 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

    But I don't want to direct all my DNS trafic to them and I'm too lazy to manually configure all my devices. So here's how to transparently unblock Netflix for all your devices using [Asuswrt Merlin][merlin]. It's custom router firmware which can be used on the Asus RT-N66U.

    ## Enable JFFS partition

    From <http://<ROUTER-IP>/Advanced_System_Content.asp>

    ## dnsmasq config

    Ssh into the machine and type

    echo "server=/netflix.com/<UNBLOCK-DNS-SERVER-IP>" > /jffs/configs/dnsmasq.conf.add

    Replace `<UNBLOCK-DNS-SERVER-IP>`with the ip address correct ip address.

    ## Chromecast

    Chromecast has hard coded DNS servers to 8.8.8.8 and 8.8.4.4. Luckily we can use simple iptables rules to redirect Chromecast DNS requests back to our router.

    Since iptables rules are not persistent we must add them to the `nat-start` hook

    ```
    cat > /jffs/scripts/nat-start <<EOF
    iptables -t nat -A PREROUTING -s <CHROMECAST-IP>/32 -d 8.8.4.4 -p udp --dport 53 -j DNAT --to <ROUTER-IP>
    iptables -t nat -A PREROUTING -s <CHROMECAST-IP>/32 -d 8.8.8.8 -p udp --dport 53 -j DNAT --to <ROUTER-IP>
    EOF
    ```

    Make the hook executable

    chmod +x /jffs/scripts/nat-start

    and reboot the router.


    ## Source

    Tomato && DD-WRT documentation on Ad-free Time! <https://adfreetime.com/get-started/chromecast/>

    [merlin]: https://github.com/RMerl/asuswrt-merlin