Installing PPTP server
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
Set forwarding Capabilities
Echo 1 >/proc/sys/net/ipv4/ip_forward
Sysctl-p
Fedora 20 to push firewalld cancel the iptables and reload
Yum Install iptables-services iptables-utils-y
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 Masquerade
Service Iptables Save
Service pptpd Restart
Service Iptables Restart
Chkconfig pptpd on
Chkconfig iptables on
Friendship Hint, note oh must put iptalbes set good otherwise may configure well because Iptalbes firewall to prevent OH.