>>> 此贴的回复 >> PPTP + RADIUS 一 安装RADIUS 1. 下载Freeradius-0.9.3.tar.gz到/home目录下; 2. 编译并安装; # tar -zxvf freeradius-0.9.3.tar.gz # cd freeradius-0.9.3 # ./configure # make # make install 二 1. 下载软件ppp.tar.gz到/home //内包括Radiusclient以及radius.so
# cd /home 2. 编译并安装ppp
# tar -zxvf ppp.tar.gz # cd ppp # ./configure # make # make install
3. 下载软件pptpd-1.1.3-4.i386.rpm 到/home目录下 #cd /home #rpm -ivh pptpd-1.1.3-4.i386.rpm 4. 起用ip forwarding: #echo 1 > /proc/sys/net/ipv4/ip_forward // 如果是这句就需要每次系统启动都要调用,所以要加到系统启动文件中。 或者修改/etc/sysctl.conf文件: net.ipv4.ip_forward = 1 //如果修改这里,就不用在启动文件中修改了 5. 清空/etc/ppp/pap-secrets和/etc/ppp/chap-secrets文件内容。
6. a.修改/etc/ppp/options.pptpd: lock require-pap proxyarp auth ms-dns xxx.xxx.xxx.xxx //根据本地DNS服务器IP地址修改 ms-dns xxx.xxx.xxx.xxx plugin radius.so b.修改/etc/pptpd.conf: option /etc/ppp/options.pptpd localip 10.1.1.1 //根据实际情况修改 remoteip 10.1.1.10-250 //根据实际情况修改
7.修改/etc/radiusclient/servers 文件: localhost linux
8. 修改/etc/radiusclient/radiusclient.conf 文件: auth_order radius authserver localhost:1812 acctserver localhost:1813
9. 修改/usr/local/etc/raddb/clients和/usr/local/etc/raddb/naslist以及、/usr/local/etc/raddb/clients.conf: /etc/raddb/clients: localhost linux /etc/raddb/naslist: 127.0.0.1 local other /etc/raddb/clients.conf: client 127.0.0.1 { secret = linux shortname = local nastype = other }
修改/usr/local/etc/raddb/radiusd.conf detailfile = /home/detail-%Y%m
10. 在终端输入以下命令: service pptpd restart
11. 修改用户名 /usr/local/etc/raddb/users: user Auth-Type:=Local,User-Password=="passwd"
12. 启动RADIUS. radiusd -sx
13. 测试用户名和密码: radtest user passwd localhost 0 linux 如果见到Access-Accept,说明OK!
14.限制用户同时上网: 修改/usr/local/etc/raddb/users: user Simultaneouse-Use:=1,Auth-Type:=Local,User-Password=="passwd"
15.把用户名与IP地址绑定: 修改/usr/local/etc/raddb/users: user Simultaneouse-Use:=1,Auth-Type:=Local,User-Password=="passwd" Framed-IP-Address=10.1.1.168
[ 关闭窗口 ]