1.关闭selinux
配置epel源, 安装PPTP 相关软件
2.wget -O /etc/yum.repos.d/centos.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.安装pptp软件包
yum -y install epel-release ppp pptp pptpd
vim /usr/lib/sysctl.d/00-system.conf
添加
net.ipv4.ip_forward = 1
sysctl -p /usr/lib/sysctl.d/00-system.conf
vim /etc/ppp/options.pptpd
ms-dns 8.8.8.8
vim /etc/ppp/chap-secrets 设置账号密码
vim /etc/pptpd.conf 注意,连续的IP用-杠相接。
1. 安装ppp,pptp,pptp-setup
yum install ppp pptp pptp-setup -y
2.pptpsetup --create VPN名字 --server VPNip --username username --password password --encrypt --start
出现 以下错误
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
MS-CHAP authentication failed:
CHAP authentication failed
Connection terminated.
解决方法:
# vim /etc/ppp/options
refuse-pap
refuse-eap
refuse-chap
refuse-mschap
require-mppe
3.route add default dev ppp0客户端加路由