centos下安裝openvpn———客戶端
[root@mi7 ~]# cd /etc/yum.repos.d/
[root@mi7 yum.repos.d]# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
[root@mi7 yum.repos.d]# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
[root@mi7 yum.repos.d]# sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
[root@mi7 yum.repos.d]# vi remi.repo
[remi]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/5/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/5/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[root@mi7 yum.repos.d]# yum -y install openvpn
[root@mi7 yum.repos.d]# rpm -qa openvpn
openvpn-2.3.6-1.el5
在mi14服務端上申請證照
[root@mi14 openvpn]# cd /usr/share/doc/openvpn-2.2.2/easy-rsa/2.0
[root@mi14 2.0]# . vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /usr/share/doc/openvpn-2.2.2/easy-rsa/2.0/keys
[root@mi14 2.0]# ./build-key-pass mi7
Generating a 1024 bit RSA private key
............++++++
...............++++++
writing new private key to 'mi7.key'
Enter PEM pass phrase:mi123
Verifying - Enter PEM pass phrase:mi123
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [CN]:回車
State or Province Name (full name) [GD]:回車
Locality Name (eg, city) [BeiJing]:回車
Organization Name (eg, company) [NetSky Studio]:回車
Organizational Unit Name (eg, section) [mi14]:mi7
Common Name (eg, your name or your server's hostname) [mi7]:mi7
Name [mi14]:mi7
Email Address [mi14@mi.com]:mi7@mi.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:回車
An optional company name []:回車
Using configuration from /usr/share/doc/openvpn-2.2.2/easy-rsa/2.0/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'CN'
stateOrProvinceName :PRINTABLE:'GD'
localityName :PRINTABLE:'BeiJing'
organizationName :PRINTABLE:'NetSky Studio'
organizationalUnitName:PRINTABLE:'mi7'
commonName :PRINTABLE:'mi7'
name :PRINTABLE:'mi7'
emailAddress :IA5STRING:'mi7@mi.com'
Certificate is to be certified until Jan 2 09:10:32 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
[root@mi14 2.0]# cp keys/mi7.* /etc/openvpn/
[root@mi7 openvpn]# scp 103.227.78.169:/etc/openvpn/mi7* /etc/openvpn/
[root@mi7 openvpn]# scp 103.227.78.169:/etc/openvpn/ca1.* /etc/openvpn/
[root@mi6 ~]# scp /etc/openvpn/client.ovpn mi7:/etc/openvpn/
[root@mi7 openvpn]# vi client.ovpn
cert mi7.crt
key mi7.key
[root@mi7 openvpn]# service openvpn start
[root@mi7 openvpn]# openvpn --config /etc/openvpn/client.ovpn
nohup openvpn --config /etc/openvpn/client.ovpn
[root@mi7 ~]# ps -ef | grep openvpn
root 27512 26386 0 17:23 pts/1 00:00:00 openvpn --config /etc/openvpn/client.ovpn
root 27584 27549 0 17:24 pts/2 00:00:00 grep openvpn
[root@mi7 ~]# ping 10.47.0.8
PING 10.47.0.8 (10.47.0.8) 56(84) bytes of data.
64 bytes from 10.47.0.8: icmp_seq=1 ttl=64 time=0.720 ms
64 bytes from 10.47.0.8: icmp_seq=2 ttl=64 time=0.892 ms
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29819001/viewspace-1392090/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS安裝git客戶端CentOSGit客戶端
- Windows下安裝redis客戶端WindowsRedis客戶端
- centos7系統msyqldump 客戶端安裝CentOS客戶端
- Oracle 客戶端安裝Oracle客戶端
- MySQL 客戶端安裝MySql客戶端
- aix安裝oracle客戶端AIOracle客戶端
- linux安裝mysql客戶端LinuxMySql客戶端
- CentOS7.1安裝Oracle 12.1客戶端以及cx_OracleCentOSOracle客戶端
- openVPN 安裝
- Ubuntu 16.04下安裝資料庫Oracle客戶端Ubuntu資料庫Oracle客戶端
- db2 客戶端安裝DB2客戶端
- Centos7安裝與配置OpenVPN伺服器CentOS伺服器
- rancher安裝Openvpn
- Skywalking PHP客戶端編譯安裝PHP客戶端編譯
- linux簡易 Oracle客戶端安裝LinuxOracle客戶端
- Kubernetes安裝之五:配置kubectl客戶端客戶端
- Ubuntu16.04 percona MySQL客戶端安裝UbuntuMySql客戶端
- 「Oracle」客戶端 PL/SQL DEVELOPER 安裝使用Oracle客戶端SQLDeveloper
- 客戶端自動配置安裝(expect工具)客戶端
- win10系統maven客戶端安裝教程_win10系統maven客戶端安裝步驟Win10Maven客戶端
- NBU 8.0客戶端安裝和備份配置客戶端
- 二 GBase 8a MPP Cluster客戶端安裝客戶端
- oracle11g客戶端靜默安裝Oracle客戶端
- CentOS連線OpenVPNCentOS
- vnc viewer 64位下載,在windows安裝vnc viewer客戶端使用教程VNCViewWindows客戶端
- 客戶端安裝虛擬機器問題解答?客戶端虛擬機
- 如何安裝和配置 Chrony 作為 NTP 客戶端?客戶端
- linux zabbix-6.0.1-Agent客戶端的安裝配置Linux客戶端
- SmartSVN for Mac 破解版安裝 mac好用SVN客戶端Mac客戶端
- rsync客戶端一鍵安裝rsync指令碼(原始碼)客戶端指令碼原始碼
- Centos下安裝cassandraCentOS
- centos下安裝dockerCentOSDocker
- Centos下安裝ffmpegCentOS
- VNC客戶端推薦,Windows系統下VNC客戶端推薦VNC客戶端Windows
- 在不安裝oracle客戶端的情況下,使用PLSQLOracle客戶端SQL
- 在Ubuntu 18.04上編譯安裝pppoe客戶端軟體Ubuntu編譯客戶端
- centos 下docker映象安裝CentOSDocker
- CentOS下安裝pip 18.0CentOS
- CentOS下tomcat安裝配置CentOSTomcat