How to Setup OpenVPN on OpenWRT routers

The following is an example of working config kindly provided by a member of the VanishedVPN community.

In this example config is applied via command line. You should be reasonably tech savvy to be able to complete this, and leave yourself 30 mins > 1 hour to configure and test.

  • Using the Web interface enable NTP and set the timezone, ensure the time on the device is correct.
  • Log into the router using SSH.
  • Install OpenVPN
opkg update
opkg install openvpn-openssl openvpn-easy-rsa luci-app-openvpn openssh-sftp-server
  • Verify the packages/programs wget, scp and kmod-tun are installed, OpenVPN relies on the tun kernel module being installed – In theory opkg should have installed these dependencies.
  • Move the /etc/easy-rsa directory to somewhere else, in case you do an upgrade and overwrite your files.
mkdir /etc/config/openvpn-config
mv /etc/easy-rsa/* /etc/config/openvpn-config/
rm -rf /etc/easy-rsa/
ln -s /etc/config/openvpn-config/ /etc/easy-rsa
rm /etc/config/openvpn_recipes
touch /etc/config/openvpn-config/client.ovpn
  • Create a password file in /etc/openvpn eg usa.txt
  • Put the username and password on two separate lines in the text file
  • Edit the ovpn file from Vanished
  • Add the password filename to the auth-user-pass line, e.g.: auth-user-pass usa.txt
cp usa.ovpn /etc/openvpn
chmod 400 /etc/openvpn/1300WebProDC.txt
  • Create a tun interface for OpenVPN to use
cat >> /etc/config/network << EOF
config interface ‘Vanished_VPN'
    option proto 'none'
    option ifname 'tun0'

In the web interface add the tunnel interfaces (Tun0) to the Wan Zone 

Select Ovpn File

Then Select WAN for the Zone 

Select Ovpn File
  • Save and Exit
  • Go to System->Startup
  • In the system startup command put
openvpn --cd /etc/openvpn --config /etc/openvpn/usa.ovpn
  • Save and exit
  • Reboot the router

Here is copies of some of our configs:
/etc/openvpn/usa.ovpn ——client


dev tun1

comp-lzo no

auth-user-pass usa.txt

resolv-retry infinite



reneg-sec 0

verb 3

proto udp

tun-mtu 1200

remote 1194 udp


script-security 2 

up /etc/openvpn/

























config interface ‘Vanished_USA’

option proto ‘none’

option ifname ‘tun1’

option defaultroute ‘0’

option mtu ‘1200’


Our startup script:



logger “OVPN: ifconfig_remote = $ifconfig_remote”

logger “OVPN: ifconfig_local = $ifconfig_local”

logger “OVPN: trusted_ip = $trusted_ip”


rule=”rule add from priority 10 table $table”

route=”route add dev $dev table $table”

route2=”route add default via $ifconfig_local dev $dev table $table”

logger “OVPN: ip $route”

logger “OVPN: ip $route2”

logger “OVPN: ip $rule”

ip $rule

ip $route

ip $route2

iptable1=”-I FORWARD -o $dev -j ACCEPT”

iptable2=”-t nat -I POSTROUTING -o $dev -j MASQUERADE”

iptable3=”-I FORWARD -i br-vanished -o eth0 -j ACCEPT”

logger “OVPN: iptables $iptable1”

logger “OVPN: iptables $iptable2”

logger “OVPN: iptables $iptable3”

iptables $iptable1

iptables $iptable2

iptables $iptable3

flush=”route flush cache”

logger “OVPN: ip $flush”

ip $flush


VanishedVPN Support

VanishedVPN Servers

Server name
Use for Examples
Unblocking US content (Netflix, Hulu), ESPN+
USA TV channels (NBC, CBS, Starz, Vudu, Sling TV etc)
Unblocking UK content (Netflix, BBC iPlayer,, NOW TV, Sky GO, Channel 4 etc)
Secure browsing, Access to Aus channels while travelling outside Australia (Foxtel Go, Plus 7, 9 Now, Ten Play). Access to Aus to avoid throttling by your ISP
P2P & Bit Torrent – These servers are based in a location where the laws on Bit Torrent are liberal. Bit Torrent is disabled on all other servers., , News, TV, Sports, Video Streaming
News, TV, Sports, Video Streaming
News, TV, Sports, Video Streaming , News, TV, Sports, Video Streaming , News, TV, Sports, Video Streaming
SuperSport, News, TV, Video Streaming
DutchTV, Sports, Video Streaming
Taiwan News, TV, Sports, Video Streaming
Turkish News, TV, Sports, Video Streaming
DAZN,, News, TV, Sports, Video Streaming
Italian News, TV, Sports, Video Streaming
New Zealand

7-day money-back guarantee

Give VanishedVPN a test drive. All plans are fully refundable, no questions asked.

Get Vanished VPN