centos7-pptp安装脚本,防火墙为默认的firewall

#!/bin/bash
yum -y update
yum -y install epel-release
yum -y install firewalld net-tools ppp pptpd
# 开启内核转发
echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf
sysctl -p
#添加pptp的登录账号密码,账号是admin 密码admin888
echo 'admin * admin888 *' >> /etc/ppp/chap-secrets
#开启虚拟IP分配
cat >>/etc/pptpd.conf <>/etc/ppp/options.pptpd < /etc/ppp/ip-up.local << END
/sbin/ifconfig $1 mtu 1400
END
chmod +x /etc/ppp/ip-up.local
systemctl restart pptpd.service
systemctl enable pptpd.service

你可能感兴趣的:(linux)