How to use OpenVPN in Linux


OpenVPN is for Virtual Private Network in Linux where the user can access to the private browser or private window.  It is for providing a flexible solutions for securing your data communication and also for remote computer access.

People usually wants to remotely access to the network where entry is illegal in their area or server. So, we have to use VPN to get access.

How to manually setup VPN using Terminal ?

  1. Open a terminal with ctrl + alt + t.
  2. Install OpenVPN :
  3. sudo apt-get install openvpn
  4. Open VPN configuration directory.
    cd /etc/openvpn
  5. Download OpenVPN configuration files with shell
  6. sudo wget
  7. If you get an error, it’s because of a certificate:
  8. sudo apt-get install ca-certificates
  9. You have to unzip the package to run it, so you better install an unzip package:
  10. sudo apt-get install unzip
  11. Now, extract with terminal:
  12. sudo unzip
  13. And remove file that will no longer be used :
  14. sudo rm zip
  15. And you can use either of them for connection purpose:
  16. sudo cd ovpn_udp / cd ovpn_udp
  17. List all the available servers, it will print whole config list
  18. ls -al
  19. Now, choose a server you would like to use.
  20. Start OpenVPN  with a chosen config.
  21. sudo openvpn [file name]
  22. After that, it will ask you for credentials which is NordVPN account credentials.
  23. So, now you have successfully connected to VPN. And to disbanded it just enter control + c.


Therefore, this is how you connec OpenVPN from terminal.

0 0 vote
Article Rating

You may also like...

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x