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

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

 

转载于:https://www.cnblogs.com/haipingwu/archive/2013/03/07/2948859.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值