centos 5.8安装pptpd

centos 5.8
http://www.onelone.com/tutorial/vpn.html





1,查看版本
version
http://murray.cn/index.php/2011/03/chakan-linux-centos-var/

lsb_release -a



2,network设置

ip+dns
http://blog.csdn.net/iamfafa/article/details/6209009
centos的设置主要在/etc/sysconfig/里,跟debian有些不同



3,安装常用工具

screen+htop+iftop
http://zoomquiet.org/res/scrapbook/ZqFLOSS/data/20090313234155/


centos 安装程序相比debian,没有这么方便


更新yum源

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
yum update




4,安装pptpd
pptpd+iptables
http://net.chinaunix.net/6/2008/01/07/1147970.shtml
http://blog.ihipop.info/2010/06/1265.html


安装ppp

yum install ppp


更新yum源,安装pptpd

vim /etc/yum.repos.d/Doylenet.repo

[doylenet]
name=Doylenet custom repository for CentOS
baseurl=http://files.doylenet.net/linux/yum/centos/5/i386/doylenet/
gpgcheck=1
gpgkey=http://files.doylenet.net/linux/yum/centos/RPM-GPG-KEY-rdoyle
enabled=1


yum update
# yum install pptpd



设置ip

vim /etc/pptpd.conf 
localip 10.0.0.2
remoteip 10.0.0.200-220



设置权限

vim /etc/ppp/chap-secrets
username * password *


支持转发

/etc/sysctl.conf

将“net.ipv4.ip_forward”的值改为1

sysctl -p


设置iptables NAT

iptables -I FORWARD -s 192.168.7.64/32 -m iprange --dst-range 192.168.7.1-192.168.7.20 -j DROP
iptables -I FORWARD -s 192.168.7.64/32 -m iprange --dst-range 192.168.7.23-192.168.7.254 -j DROP



iptables的规则保存与debian有所不同

/etc/init.d/iptables save

设置自动启动服务

chkconfig pptpd on
chkconfig iptables on




另可参考我的debain设置






5,关闭不用服务(主要是不知道如何删除)

http://blog.chinaunix.net/uid-24250828-id-3161214.html




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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值