OpenLDAP+FreeRADIUS+MySQL+RP-PPPOE 构建PPPOE服务器

经过几天的奋战,总算搞定这个PPPOE服务器。

基本环境:

Host: LFS-6.x
openLDAP: 2.3.19
MySQL: 5.0.24
rp-pppoe: 3.8
freeradius: 1.1.3
ppp: 2.4.4 (with mppe-mppc patched)
kernel: 2.6.18 (built-in mppe-mppc support)


简介:
rp-pppoe 作为 PPPOE 服务器,通过 radius 模块,将用户验证交给 freeradius 来处理, freeradius 又使用 LDAP 来保存拨号用户的验证信息(用户名/密码之类的)、MySQL 来存储拨号相关信息(日志记账,如连接时间,流量等)。

步骤:

至于上述软件的编译就不提了,网上到处都可以找到

配置:

#### ppp: (/etc/ppp/options) ####################################
lock
crtscts
nobsdcomp
nodeflate
nopcomp
debug

plugin /etc/ppp/plugins/radius.so
radius-config-file /etc/radiusclient/radiusclient.conf
#################################################################

#### rp-pppoe: (/etc/ppp/pppoe-server) ##########################
auth
require-pap
default-mru
default-asyncmap
lcp-echo-interval 10
lcp-echo-failure 3
ms-dns 211.161.159.3
ms-dns 211.161.159.5
noipdefault
noipx
defaultroute
noproxyarp
noktune
10.0.0.1:10.0.0.200
netmask 255.255.255.255
logfile /var/log/pppoe.log
#################################################################

#### ldap 数据库 ################################################
# test, pppoe, example.com
dn: cn=test,o=pppoe,dc=example,dc=com
cn: test
objectClass: radiusProfile
radiusAuthType: Local
userPassword: 123456
radiusServiceType: Framed-User
radiusFramedProtocol: PPP
radiusFramedIPAddress: 10.0.0.2
radiusFramedIPNetmask: 255.255.25.0
#################################################################

#### radiusd.conf ###############################################
modules {

ldap {
server = "localhost"
identity = "cn=Manager,dc=example,dc=com"
password = secret
basedn = "o=pppoe,dc=example,dc=com"
filter = "(cn=%{Stripped-User-Name:-%{User-Name}})"
base_filter = "(objectclass=radiusProfile)"
#access_attr = "dialupAccess"
password_attribute = userPassword
}
}

authorize {

# chap
# mschap
# files
ldap
}

authenticate {
Auth-Type LDAP {
ldap
}
}

accounting {
sql
}
#################################################################

MySQL 数据库表和 LDAP 的schema文件可以在freeradius的源代码目录下的 doc/examples
下面找到。
 
转载:http://www.linuxpk.com/72556.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值