PhotonVPS XEN VPS搭建PPTP服務(CentOS 5.7 64bit)

來源:互聯網
上載者:User

1.Frist, make sure you have ppp installed

yum install -y ppp iptables

yum install perl

2.Download lastest version pptpd rpm package

wget http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm

3.Installing the rpm

rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm

4.Open the file /etc/ppp/options.pptpd

vi /etc/ppp/options.pptpd

Uncomment the ms-dns lines (by removing the ‘#’ in front of them) and change them to the dns servers provided by your ISP or to public DNS servers like ones provided by OpenDNS.

ms-dns 208.67.222.222
ms-dns 208.67.220.220

5.Open the file /etc/ppp/chap-secrets

vi /etc/ppp/chap-secrets

Add usernames and passwords for your clients. You need to enter the usernames and passwords in the following format.

myusername pptpd mypassword *

6.Open the file /etc/pptpd.conf

vi /etc/pptpd.conf

Go to the end of the file where you can see examples of localip and remoteip. Below them add your own values for localip and remoteip.

localip 192.168.8.1
remoteip 192.168.8.101-200

7.Open the file /etc/sysctl.conf

vi /etc/sysctl.conf

Enable IP forwarding and make the changes to sysctl.conf take effectnet.ipv4.ip_forward = 1
/sbin/sysctl -p

8.Configure iptables to do NAT.

/sbin/service iptables start
/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.8.0/24 -j MASQUERADE
service iptables save

9.Finally, Start the pptp service

/sbin/service pptpd start
chkconfig pptpd on

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.