« Back to all guides

Guide to install OpenVPN for OpenWrt

1. Deactivate IPv6 on the dashboard

You must be logged in to see this.

2. SSH into the router

Open a terminal, and enter: ssh root@_yourroutersipaddress_. Replace _yourroutersipaddress_ with the IP address to your router.
When prompted, enter the management password for your router.

3. Configure OpenVPN

Enter the following command in the terminal:

opkg update
opkg install wget
opkg install openvpn-openssl
wget https://www.ovpn.com/download/openwrt/install.sh --no-check-certificate -O /tmp/install.sh && cd /tmp/ && chmod 0777 install.sh && ./install.sh && rm install.sh

Then run the following command, but change PASSWORD to your OVPN password::

You must be logged in to see this.
4. Masquerading on WAN

Make sure your WAN interface is set to Masquerading. Go to Network » Firewall and scroll down.

If the checkbox called Masquerading is unchecked for WAN, please check it and press Save & Apply.

5. Restart router

Restart the router and go to System » Reboot and then click Perform reboot.

6. Finished

You should now be connected to OVPN and be able to browse the internet safely. To make sure everything was set up correctly, please check the dashboard to verify that you are connected.

Also make sure that you do not have any DNS leaks by going to IPleak.net and check your detected DNS Address.

You should have or as your address if everything is working. If you see another address, follow this guide to fix any DNS leaks.

Platform: OpenWrt
Version: OpenWrt Barrier Breaker 14.07
Luci: LuCI Trunk (0.12+svn-r10530)