前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux 搭建 VPN1

Linux 搭建 VPN1

作者头像
franket
发布2022-06-30 00:03:05
7K0
发布2022-06-30 00:03:05
举报
文章被收录于专栏:技术杂记

安装pptpd软件包

代码语言:javascript
复制
[root@pptp-server ~]# yum list all | grep -i pptp 
NetworkManager-pptp.x86_64                   1:0.8.0-1.git20100411.el6    epel  
pptp.x86_64                                  1.7.2-8.1.el6                base  
pptp-setup.x86_64                            1.7.2-8.1.el6                base  
pptpd.x86_64                                 1.4.0-3.el6                  epel  
[root@pptp-server ~]# yum -y  install  pptpd.x86_64 
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package pptpd.x86_64 0:1.4.0-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                      Arch                          Version                               Repository                   Size
====================================================================================================================================
Installing:
 pptpd                        x86_64                        1.4.0-3.el6                           epel                         75 k

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

Total download size: 75 k
Installed size: 178 k
Downloading Packages:
pptpd-1.4.0-3.el6.x86_64.rpm                                                                                 |  75 kB     00:00     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from http://yum.ksyun.cn/epel/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid: "EPEL (6) <epel@fedoraproject.org>"
 From  : http://yum.ksyun.cn/epel/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : pptpd-1.4.0-3.el6.x86_64                                                                                         1/1 
  Verifying  : pptpd-1.4.0-3.el6.x86_64                                                                                         1/1 

Installed:
  pptpd.x86_64 0:1.4.0-3.el6                                                                                                        

Complete!
[root@pptp-server ~]# 

打开内核参数 net.ipv4.ip_forward

代码语言:javascript
复制
[root@pptp-server ~]# sysctl  -a | grep forward 
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.lo.forwarding = 0
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.eth0.forwarding = 0
net.ipv4.conf.eth0.mc_forwarding = 0
net.ipv4.ip_forward = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.all.mc_forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.mc_forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv6.conf.lo.mc_forwarding = 0
net.ipv6.conf.eth0.forwarding = 0
net.ipv6.conf.eth0.mc_forwarding = 0
[root@pptp-server ~]# vim /etc/sysctl.conf 
[root@pptp-server ~]# grep forward /etc/sysctl.conf 
net.ipv4.ip_forward = 1
[root@pptp-server ~]# sysctl  -p 
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
error: "net.ipv4.conf.eth1.rp_filter" is an unknown key
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
error: "net.ipv4.conf.eth1.arp_announce" is an unknown key
[root@pptp-server ~]# sysctl  -a | grep forward 
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.eth0.forwarding = 1
net.ipv4.conf.eth0.mc_forwarding = 0
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.all.mc_forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.mc_forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv6.conf.lo.mc_forwarding = 0
net.ipv6.conf.eth0.forwarding = 0
net.ipv6.conf.eth0.mc_forwarding = 0
[root@pptp-server ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装pptpd软件包
  • 打开内核参数 net.ipv4.ip_forward
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档