Ubuntu openvpn with .ovpn file
来源:互联网 发布:node v0.12.0 x64.msi 编辑:程序博客网 时间:2024/06/16 06:51
zz from: https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/
This post explains how to connect to a VPN from Ubuntu when you are given a .ovpn file. We will use Ubuntu’s network manager to connect to the VPN.
This might look long – but its pretty simple :)
Install the required packages
sudo apt-get install network-manager network-manager-openvpn network-manager-openvpn-gnome
Creating individual files fromclient.ovpn file
Get the correct .ovpn file from your administrator ( the one in this post is called client.ovpn ).
Because there is a bug in the network manager ( https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365 ) we cannot import the file directly, we will have to chop up the file manually and do some minor workarounds
These files must be kept safe and private at all times
- Make a directory called openvpn in your home directory
- Copy the client.ovpn file into dir openvpn
- Optional: Keep an original copy of the file – call it client.ovpn.orig
- Next we will create 4 files under the openvpn directory. Open the client.ovpn file in a text editor
- Create a file called ca.crt – copy the text between<ca> and </ca> from client.ovpn into this file
- Create a file called client.crt – copy the text between<cert> and </cert> from client.ovpn into this file
- Create a file called client.key – copy the text between<key> and </key> from client.ovpn into this file
- Create a file called ta.key – copy the text between<tls-auth> and </tls-auth> from client.ovpn into this file
- At this point i have a total of 6 files under my openvpn directory
Modify the client.ovpn file
Just before the ## —–BEGIN RSA SIGNATURE—– line add the below lines and save
ca ca.crt
cert client.crt
key client.key
tls-auth ta.key
Setting up the Network Manager
- Click on Ubuntu network icon on the top right
- Select VPN Connections -> Configure VPN ( the Network Connections window will open )
- Click on the VPN tab and click Import
- Select the client.ovpn file we just modified and it should automatically import some things into the next screen
- Connection Name will be = client – change this to something meaningful ( i set it tocompanyVPN )
- Gateway must be imported already
- Type is : Password with Certificates ( TLS ) – this was also set for me
- Provide the username and password for VPN
- User certificate will be client.crt
- CA certificate will be ca.crt
- Private Key will be client.key
- Click on Advanced -> TLS Authentication Tab
- Key file will be ta.key
- Key Direction must be set based on the key direction in yourclient.ovpn file
- Open the client.ovpn file and search for “key-direction” and note the number after that ( mine is key-direction1 )
- Put this number in the Key Direction field in the TLS Authentication Tab
- Click save on all windows and close all windows.
Time to test connection
- Click on Ubuntu network icon on the top right
- Select VPN Connections and you should see your connection there – click it
- If successfully connected, you will see a message and then you can verify your IP address with ifconfig
- There is a Disconnect VPN under VPN Connection for obvious reasons
- Ubuntu openvpn with .ovpn file
- openVPN的客户端的client.ovpn配置.
- Ubuntu 14.04 LTS: File Sharing With Samba
- Ubuntu:使用openvpn客户端
- Configure OpenVPN on Ubuntu
- UBUNTU 安装OPENVPN
- ubuntu 快速部署openvpn
- ubuntu openvpn安装
- ubuntu 搭建 OPENVPN
- ubuntu下配置OpenVPN
- ubuntu openvpn服务器安装
- ubuntu使用openvpn
- 在Ubuntu下配置OpenVPN
- ubuntu下安装openvpn client
- Install Ubuntu with ISO image file, without burning to CD
- sublime text3 install in ubuntu with tar file
- OpenVPN
- OpenVPN
- C# socket
- Stanford机器学习---第一周.监督学习与梯度下降
- 句柄
- Phpwind v8.7怎么修改默认编辑器字体方法?
- linux发行版的分析比较
- Ubuntu openvpn with .ovpn file
- Spark-KMeans文本聚类
- 2015年12月
- X Y Z从大到小排序输出
- android activity与view的联系--window
- iOS Newbie - Xcode 7 & iOS 9 前篇(非技术)
- 8583报文简单分析
- Angularjs 页面切换动画(ui-view)
- java 类加载器(class loader)深入探讨