First, the experimental environment
Windows 10, 64-bit
VMware® Workstation 15 Pro
CentOS-7-x86_64-DVD-1810.iso
Two, Centos Installation Considerations
* When installing centos note the following three points
1, modify the VMware virtual Editor
/
2、
3, if a start is to use bridge mode, you need to configure the local source centos.repo
Pptp will later need to install dependencies, here is the download address http://rpmfind.net/linux/epel/6/x86_64/Packages/p/pptpd-1.4.0-3.el6.x86_64.rpm
Third, after the completion of installation configuration changes
1, edit card
2, check whether the system supports pptp
Enter the following command returns ok it shows the system supports pptp
modprobe ppp-compress-18 && echo ok
3、安装PPP,PPTP,net-tools,iptables-services
1、yum install -y ppp
2、yum install -y pptpd
3、yum install -y iptables-services
# Iptables open close firewalld
systemctl stop firewalld
systemctl disable firewalld
systemctl start iptables
systemctl enable iptables
4, modify the selinux
vi /ect/selinux/config
SELINUX=disabled
5, modify the configuration file (focus)
(1) editor vi /etc/pptpd.conf added at the end
localip own ip
remoteip 192.168.0.100-192.168.0.150
(2) edit vi / etc / ppp / chap-secrets added at the end
user1 * user1pass *
(3) Edit vi /etc/ppp/options.pptpd (uncommented modify for their own DNS)
1、#ms-dns 10.0.0.1
2、#ms-dns 10.0.0.2
(4) editor vi /etc/sysctl.conf (added at the end)
net.ipv4.ip_forward=1
It allows the system to route forward, execute the command sysctl -p file take effect immediately after repair
(5) adding firewall rules (leaving only one rule)
iptables -t nat -I POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source 10.3.77.221 (own server IP)
service iptables save
service iptables restart
Use iptables -nL --line-numbers to view the other rules (following reservation) Delete command iptables -D INPUT / FORWARD / OUTPUT No.
(6) editing vi / etc / ppp / ip- up exit 0 Add the above
ifconfig $ 1 mtu 1472
systemctl restart pptpd