Configure OpenVPN client by importing .ovpn file

You are here:
Estimated reading time: 1 min

We have already detailed how to configure the OpenVPN client functionality in E-Series routers from the web interface in this post. That is a good way of doing step by step but it requires to upload all certificate files individually. Generally, using a simplified .ovpn file is a preferred way of configuring an OpenVPN client as it is a much faster and convenient way of setting up the VPN tunnel.

Assuming that you have an .ovpn file that has been properly generated by your OpenVPN server, you can follow these steps to configure OpenVPN client in our routers (this has been tested on an E224 router running firmware version 2.3.0):

  • Copy the client.ovpn file from your local hard drive to the router:
    # You can use command 'scp' on Unix systems. For Windows, you can use WinSCP utility
    scp /path/to/file/client.ovpn root@192.168.1.1:/etc/config/client.ovpn
  • Download the file ovpn.sh to your local hard drive and copy it to the router as well:
    ovpn.sh script
    ovpn.sh
    Version: 1 – File size: 2 KB – Downloads: 74

    # You can use command 'scp' on Unix systems. For Windows, you can use WinSCP utility
    scp /path/to/file/ovpn.sh root@192.168.1.1:/tmp/
  • SSH to your router and execute the script you have just downloaded:
    # Use SSH agent on Unix, use PuTTY on Windows
    ssh root@192.168.1.1
    # Once you have accessed the router, make the script executable
    chmod +x /tmp/ovpn.sh
    # Execute the script to automatically configure your OpenVPN client connection
    /tmp/ovpn.sh
  • After having done this, you should be able to see the IP address assigned by the OpenVPN server on Services > VPN tab:
  • The script automatically creates three traffic rules that allow to ping, ssh and get access to the router from the VPN tunnel. If you do not want to use any of those, just go to Network > Firewall > Traffic rules and disable them if needed:
Was this article helpful?
Dislike 5 0 of 5 found this article helpful.
Views: 1848
Back to Top