Deploy PPTP server in centos 6.2

Source: Internet
Author: User

1. System Environment Description

[[email protected] ~]# uname -aLinux cdit-00007b48 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /etc/issueCentOS release 6.2 (Final)Kernel \r on an \m

2. Check the system environment to see if PPTP can be installed.

[[Email protected] etc] # modprobe ppp-compress-18 & Echo okok [[email protected] etc] # Cat/dev/NET/TUN Cat:/dev/NET/TUN: file descriptor in bad state # The above prompt indicates that PPTP can be installed.

Check whether the current system has integrated PPP

[[email protected] etc]# rpm -q pppppp-2.4.5-5.el6.x86_64

3. Deploy the PPTP Service

1. Update Perl. PPP

[[email protected] ~]# yum install -y perl ppp

2. Install PPTP

[[email protected] etc]# rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm[[email protected] etc]# yum install pptpd

3. modify the configuration file

1. Modify the options.ppt PD configuration file.

[[email protected] etc]# cat > /etc/ppp/options.pptpd  <<EOFname pptpdrefuse-paprefuse-chaprefuse-mschaprequire-mschap-v2require-mppe-128proxyarplocknobsdcompnovjnovjccompnologfdidle 2592000ms-dns 8.8.8.8ms-dns 8.8.4.4EOF

2) Modify PPTP. conf

[[email protected] etc]# egrep -v "^#|^$" /etc/pptpd.confoption /etc/ppp/options.pptpdlogwtmplocalip 192.168.0.1remoteip 192.168.0.2-238,192.168.0.100

3) Modify chap-secrets

[[email protected] etc]# cat /etc/ppp/chap-secrets# Secrets for authentication using CHAP# client        server  secret                  IP addresses   username           pptpd   password               *

4. Modify the Firewall

Iptables-I input-p udp -- dport 53-J acceptiptables-I input-p tcp -- dport 53-J acceptiptables-I input-p tcp -- dport 1723-J acceptiptables-I input -P gre-J acceptiptables-T Nat-A postrouting-O eth0-J masquerade # Or/sbin/iptables-T Nat-A postrouting-O eth0-s 192.168.0.0/24-J masquerade

5. Save the firewall configuration

[[email protected] etc]# iptables-save > /etc/sysconfig/iptables

6. Start the PPTP Service

[[email protected] etc]# /etc/init.d/pptpd start

OK. Now the PPTP-VPN is set up. You can use your phone or PC to test it!



This article is from the "technology to the future" blog, please be sure to keep this source http://jishuweiwang.blog.51cto.com/6977090/1433478

Related Article

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.