Fedora 20 steps to build a VPN server

Source: Internet
Author: User
Tags flush iptables


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.

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.