Fedora 20 steps to build a VPN server

Source: Internet
Author: User
Tags flush iptables

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.