centos 6.2 部署pptp伺服器

來源:互聯網
上載者:User

標籤:pptp

一.系統內容說明

[[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

二、系統內容檢查,查看是否允許安裝pptp

[[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# 提示如上,表示可以安裝pptp

    檢查當前系統是否整合了ppp

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

三、部署pptp服務

1. 更新perl.ppp版本

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

2. 安裝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. 修改設定檔

    1)修改options.pptpd設定檔

[[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)修改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)修改chap-secrets

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

4. 修改防火牆

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# 或者/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE

5. 儲存防火牆配置

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

6. 啟動pptp服務

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

OK.至此PPTP-VPN搭建完畢. 可以用你的手機或者PC來測試了!



本文出自 “技術成就未來” 部落格,請務必保留此出處http://jishuweiwang.blog.51cto.com/6977090/1433478

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.