Do not look down, according to use PRITUNL to build VPN server to do relatively simple
The instructions on the Internet are all rubbish, all kinds of chaos. It's a waste of my time.
Installing PPTP server
sudo yum install pptpd-y
Edit
Vim/etc/ppp/chap-secrets
Join a line
User name pptpd Password *
Start pptpd
Service PPTPD Start
Try to connect to the client, establish a PPTP connection, remember to go to advanced settings, open use MPPE encryption, or not even
Even after, can't surf the internet, first disconnect, behind still have work to do.
Set VPN IP segment
echo "Localip 192.168.0.1" >>/etc/pptpd.conf
echo "Remoteip 192.168.0.2" >>/etc/pptpd.conf
To set DNS for VPN
echo "Ms-dns 8.8.8.8" >>/etc/ppp/options.pptpd
echo "Ms-dns 8.8.4.4" >>/etc/ppp/options.pptpd
Turn on jump
Echo 1 >/proc/sys/net/ipv4/ip_forward
Fedora 20 in order to push Firewalld canceled iptables, loaded back, such as Firewalld trouble off: Fedora 18 Firewalld Firewall
Yum Install iptables-services Iptables-utils
Use Iptables to forward, realize the Internet
Iptables--flush postrouting--table nat
Iptables--flush FORWARD
iptables-a input-p tcp-m TCP--dport 1723 -j ACCEPT
iptables-a input-p gre-j ACCEPT
iptables-t nat-a postrouting-s 192.168.0.0/24-o eth0-j E
Service iptables save
Service pptpd Restart
Service iptables restart
Chkconfig pptpd on
chkconfig IP Tables on