UBNT EdgeRouter X – Configure OpenVPN + SmartDNS from Expressvpn

My helpful picture

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.

  1. SCP/SFTP: file into router my_expressvpn_anycountry_-_any_city_udp.ovpn, you will find this from expressvpn.

  2. You need to ssh into the router,

  3. Create a file in /config/auth/user-pass.txt, enter username on the first line and password on second, you will get these from expressVPN

  4. Edit *.ovpn file you just copied over with either vi or nano,

  5. Insert /config/auth/user-pass.txt in front of auth-user-pass and below that write route-nopull

  6. In router shell type configure,

  7. 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'
     4set firewall modify express_vpn_route rule 10 description 'ExpressVPN'
     5set firewall modify express_vpn_route rule 10 source address
     6set firewall modify express_vpn_route rule 10 modify table 1
     8set protocols static table 1 interface-route next-hop-interface vtun0
    10set interfaces switch switch0 firewall in modify express_vpn_route
    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

it first suggested in this post, where I found this part from, suggested to send one ip to to vpn, where as my plan was to send everything in my router through vpn, so I wrote 0.

  1. type in commit press enter and then type in save and press enter.

  2. 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 expressVPN 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.

comments powered by Disqus