Update 04/26/2021: I have not re-visited this guide in some time. This method no longer appears to be fully working. I no longer have Netflix to test this guide. Please follow the x3mRouting thread for information/help with this tool: https://www.snbforums.com/threads/x3mrouting-selective-routing-for-asuswrt-merlin-firmware.57793/
Update 07/17/2020: It seems that Netflix has made some changes recently. I’ve updated this post to reflect the latest working setup.
Update 06/30/2020: This guide has been updated to reflect the changes introduced in x3mRouting v 2.0.
I currently have a few of the devices on my network on an always-on VPN connection – see https://blog.nicktamm.com/mullvand-vpn-on-asuswrt-merlin-for-specific-devices/
This has worked great except for one issue I ran into – Netflix would not play over the VPN on these devices. After some research, I found a solution that allows all Netflix traffic to bypass the VPN so that it works on all devices using x3mRouting. This quick post will explain how.
Things you will need:
- An ASUS router that has USB ports, flashed with Asuswrt-Merlin version 384.15 or higher. This version includes amtm (Asuswrt-Merlin Terminal Menu) built into the firmware.
- SSH enabled on your router. This can be found in Administration >System.
- Enable JFFS custom scripts and configs must be enabled. This can be found in Administration >System.
- A USB thumb drive, 8GB or higher should be fine
- Insert your USB thumb drive into your ASUS router and wait for the device to be recognized by the router.
- Next, establish an SSH connection to your router and enter in
amtmto launch the amtm menu.
- Note that if the menu does not launch, you are using a version or Asuswrt-Merlin that is below 384.15. Please update to the latest version or follow the setup guide on the amtm page for older firmware versions.
- Follow the on-screen instructions to go through the first-time setup of amtm.
- Once it is installed, type in
fdto format your USb thumb drive as
ext4. Note that you will need to reboot the router after this step.
- After the USB thumb drive has been formatted, type in
ithen press enter to see a list of available packages.
- At the list of options, select
epto install Entware packages. Follow the on screen instructions to install the software to the USB thumb drive – this should be straight-forward.
- Once Entware is installed, go back to the list of options and type in
6to install x3mRouting.
- Durring the x3MRouting setup, select the third option –
Install OpenVPN Event & x3mRouting.sh Script.
- After x3MRouting has been installed, exit the x3mMenu option, then exit the amtm menu as well. You should now be back at the prompt.
- Next you will launch a set of commands that will download the list of Netflix IP’s (see https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) and will route this traffic over an interface on your router. Each interface is designated by a number on your router as follows:
0 = WAN
1 = VPN Client 1
2 = VPN Client 2
3 = VPN Client 3
4 = VPN Client 4
5 = VPN Client 5
Since we want to route all Netflix traffic to the WAN, we will be selecting
- Now you will need to enter the following commands in your SSH window:
x3mRouting 1 0 NETFLIX-DNS dnsmasq=netflix.com,nflxext.com,nflximg.com,nflximg.net,nflxso.net,nflxvideo.net,amazonaws.com
x3mRouting 1 0 NETFLIX_AS2906 asnum=AS2906
- Once the commands have been executed, launch Netflix on your VPN connected device. You should be able to watch anything just as if there was no VPN.
These changes will persist when the router has been rebooted, so you should not need to enter them again.
If this is still not working for you, try also adding a routing rule for Amazon Global region, as Netflix is hosted on Amazon servers.
x3mRouting 1 0 AMAZON-GLOBAL aws_region=GLOBAL