Linux 搭建 VPN

2022-06-30 00:02:39 浏览数 (1)

前言

VPN (Virtual Private Network) 虚拟私有网络 (也有叫虚拟专用网络的),是在互联网上使用各种技术构建出一个加密隧道,然后通过这个隧道直达对端,与对端形成一种局域互联的技术,VPN可以实现以局域互联的身份使用到远程网络资源的效果

作为翻墙越货,登堂入室,隐身马甲之必备神器,很有必要了解一点,这里我分享一下在Linux中搭建的方法


概要


环境

内核版本 2.6.32-504.el6.x86_64

系统版本 CentOS release 6.6 (Final)

代码语言:javascript复制
[root@pptp-server ~]# uname  -a 
Linux pptp-server.cloud.com 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@pptp-server ~]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel r on an m

[root@pptp-server ~]# 

安装ppp软件包

代码语言:javascript复制
[root@pptp-server ~]# yum install ppp 
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
addons                                                                                                       | 3.4 kB     00:00     
addons/primary_db                                                                                            | 4.4 MB     00:00     
base                                                                                                         | 3.7 kB     00:00     
base/primary_db                                                                                              | 4.6 MB     00:00     
centosplus                                                                                                   | 3.4 kB     00:00     
centosplus/primary_db                                                                                        | 2.0 MB     00:00     
contrib                                                                                                      | 2.9 kB     00:00     
contrib/primary_db                                                                                           | 1.2 kB     00:00     
dag                                                                                                          | 1.9 kB     00:00     
dag/primary_db                                                                                               | 2.7 MB     00:00     
epel                                                                                                         | 4.3 kB     00:00     
epel/primary_db                                                                                              | 5.7 MB     00:00     
extras                                                                                                       | 3.4 kB     00:00     
extras/primary_db                                                                                            |  31 kB     00:00     
update                                                                                                       | 3.4 kB     00:00     
update/primary_db                                                                                            | 4.4 MB     00:00     
Package iptables-1.4.7-14.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package ppp.x86_64 0:2.4.5-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                     Arch                           Version                              Repository                    Size
====================================================================================================================================
Installing:
 ppp                         x86_64                         2.4.5-5.el6                          base                         323 k

Transaction Summary
====================================================================================================================================
Install       1 Package(s)

Total download size: 323 k
Installed size: 760 k
Is this ok [y/N]: y
Downloading Packages:
ppp-2.4.5-5.el6.x86_64.rpm                                                                                   | 323 kB     00:00     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from http://yum.ksyun.cn/centos/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
 From  : http://yum.ksyun.cn/centos/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ppp-2.4.5-5.el6.x86_64                                                                                           1/1 
  Verifying  : ppp-2.4.5-5.el6.x86_64                                                                                           1/1 

Installed:
  ppp.x86_64 0:2.4.5-5.el6                                                                                                          

Complete!
[root@pptp-server ~]# 

0 人点赞