广告:本站正在使用由 热网互联 提供的云主机(香港CIA线路)

MENU

L2TP搭建+结合FREERADIUS完整流程

2016 年 04 月 29 日 • 实验室

第一部分:安装L2TP:

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/across/master/l2tp.sh
chmod +x l2tp.sh
./l2tp.sh

第二部分:安装freeradius-client
下载,解压,编译安装freeadius:

wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-client-1.1.7.tar.gz
tar  -zxvf freeradius-client-1.1.7.tar.gz
./configure
make && make install

参数配置:

vi /usr/local/etc/radiusclient/servers

加入:验证服务器ip 密钥

120.25.78.232 klink

vi /usr/local/etc/radiusclient/radiusclient.conf

内容写入:

auth_order    radius,local
login_tries 4
login_timeout   60
nologin /etc/nologin
issue   /usr/local/etc/radiusclient/issue
authserver  验证服务器:1812
acctserver  验证服务器:1813
servers     /usr/local/etc/radiusclient/servers
dictionary  /usr/local/etc/radiusclient/dictionary
login_radius    /usr/sbin/login.radius
seqfile     /var/run/radius.seq
mapfile     /usr/local/etc/radiusclient/port-id-map
default_realm
radius_timeout  10
radius_retries  3
login_local /bin/login
Bash
vi /usr/local/etc/radiusclient/dictionary

在最后加入:

INCLUDE /usr/local/etc/radiusclient/dictionary.microsoft
INCLUDE /usr/local/etc/radiusclient/dictionary.ascend
INCLUDE /usr/local/etc/radiusclient/dictionary.compat
INCLUDE /usr/local/etc/radiusclient/dictionary.merit

vi /etc/ppp/options.xl2tpd

在最后加入:

plugin radius.so
plugin radattr.so
radius-config-file /usr/local/etc/radiusclient/radiusclient.conf

重启服务:

service xl2tpd restart

清空日志:

cat /dev/null > /var/log/messages

尝试使用帐号登陆,出现错误则打开日志,查看错误,注释相应错误:

vi /var/log/messages

//dictionary.microsoft 需要上传到服务器对应位置

//dictionary 为修正版适用于vr云主机

标签: l2tp, freeradius