First, detect whether PPP and Tun are enabled
cat /dev/ppp cat /dev/net/tun
If the display is like this
cat: /dev/ppp: No such device or address cat: /dev/net/tun: File descriptor in bad state
The description has been enabled.
1.Install pptpd iptables
yum install pptpd yum install iptables
2.Modify the configuration file
Modify the allocation address
# /etc/pptpd.conf localip 10.0.0.1 remoteip 10.0.0.100-200
Modify the DNS server
# /etc/ppp/options.pptpd note offMS-dns 184.108.40.206 ms-dns 220.127.116.11
Add the account password
# /etc/ppp/chap-secrets username pptpd passwd * The assigned IP is if it is*It can be used by many people. Fixed IP can be used by one person.
Open kernel forwarding
# /etc/sysctl.conf net.ipv4.ip_forward = 1
If there is such a mistake like the lower side
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
modprobe bridge lsmod|grep bridge /sbin/sysctl -p
Setting up firewall rules
#eth0Network card for InternetIptables-t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE # Preservation rules/etc/init.d/iptables save Or service iptables save
Set up and start from start
chkconfig iptables on chkconfig pptpd on
The new direct protocol is PPTP, and the connection is not connected. Please check it in attribute and security.
I found a bug, maybe bug, Google, and some netizens had similar problems, and only under win10.
After the connection is successful, the DNS address of the server will not be applied to the local machine. The DNS address is also the address assigned by the intermediary network adapter. If the problem of DNS is built, it will be manually specified.
yum install -y ppp pptp pptp-setup pptpsetup --create name --server IP --username name --password **** --encrypt –start