UBNT EdgeRouter X – configure OpenVPN + SmartDNS from Expressvpn
Published on Jan 9, 2018
If you are like me, and content you surf is localised, you will get frustrated soon, you will opt for VPN, proxies and smart DNS, what I am going to share below is a specific setting, for my router which is UBNT EdgeRouter X 5 Port.
- SCP/SFTP: file into router,
my_expressvpn_anycountry_-_any_city_udp.ovpnyou will find this from expressVPN.
- You need to ssh into the router,
- Create a file in,
/config/auth/user-pass.txtenter username on the first line and password on second, you will get these from expressVPN
*.ovpnfile you just copied over with either vi or nano,
/config/auth/user-pass.txtin front of
auth-user-passand below that write
- In router shell type configure,
- execute these, in configure:
1set interfaces openvpn vtun0 config-file /config/auth/my_expressvpn_anycountry_-_and_city_udp.ovpn 2set interfaces openvpn vtun0 description 'ExpressVPN' 3 4set firewall modify express_vpn_route rule 10 description 'ExpressVPN' 5set firewall modify express_vpn_route rule 10 source address 192.168.0.0/32 6set firewall modify express_vpn_route rule 10 modify table 1 7 8set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface vtun0 9 10set interfaces switch switch0 firewall in modify express_vpn_route 11 12set service nat rule 5001 description 'ExpressVPN' 13set service nat rule 5001 log disable 14set service nat rule 5001 outbound-interface vtun0 15set service nat rule 5001 type masquerade
NOTICE: set firewall modify express_vpn_route rule 10 source address 192.168.0.0/32
it first suggested in this post, where I found this part from, suggested to send one ip to VPN, whereas my plan was to send everything in my router through VPN, so I wrote 0.
- type in commit press enter and then type in save and press enter.
- we need to change DNS so that every DNS query goes through expressVPN, so go to DHCP services in Router and type DNS 1 and DNS 2 as told by express VPN in media streamer support page.
and you are done.
it seems to work with my every device, be it chromecast, or smart tv and streaming paid websites.