I was trying to enable openvpn on my router using operwrt firmware. I ran into few roadblockers so decided to document it here for reference.
-
go to URL - https://openwrt.org/toh/start
-
You will see the list of images available. Select and download the correct image based on your router model.
- Go to Luci GUI of your router and flash the image on your router.
Connect to the router using SSH and execute below commands -
- opkg update
- opkg install openvpn-openssl luci-app-openvpn
- openvpn –version
Once openvpn is installed, then VPN tab will be show in the home screen of the Luci router interface.
-
Your VPN provider will provide the openvpn configuration file. Download the file. Along with openvpn config file, you will also get the username and password required for authentication.
- Copy the username and password as obtained from your vpn vendor to auth.txt file in new lines.
- Copy the file to /etc/openvpn/custom/auth.txt in router using ssh.
- Update the file access in the openvpn configuration file - auth-user-pass /etc/openvpn/custom/auth.txt
/etc/openvpn/custom/auth.txt
- change access mode of the auth file to be accessed by openvpn chmod <> /etc/openvpn/custom/auth.txt