Centos安裝Freeradius+daloRADIUS配合ROS PPPOE驗證

來源:互聯網
上載者:User

Centos安裝Freeradius+daloRADIUS配合ROS PPPOE驗證

LAMP環境安裝:

yum -y install httpd httpd-devel mysql mysql-server mysql-develyum -y install php php-devel php-mysql php-common php-gd php-mbstring php-mcrypt php-xml/etc/init.d/httpd start/etc/init.d/mysqld startchkconfig httpd onchkconfig mysqld onmysqladmin -u root password 'newpassowrd'

Freeradius安裝:

yum install freeradius2 freeradius2-mysql freeradius2-utils/etc/init.d/radiusd startchkconfig radiusd on

測試Freeradius:

radiusd -XListening on authentication address * port 1812Listening on accounting address * port 1813Listening on command file /var/run/radiusd/radiusd.sockListening on authentication address 127.0.0.1 port 18120 as server inner-tunnelListening on proxy address * port 1814Ready to process requests.

配置Freeradius支援sql:

cat /etc/raddb/radiusd.conf $INCLUDE sql.conf #調用sql.conf配置,去除之前的#cat /etc/raddb/sites-enabled/default #下兩段中添加sqlauthorize {preprocesschapmschapdigestsuffixeap {ok = return}filessqlexpirationlogintimepap}accounting {detailunixradutmpsqlexecattr_filter.accounting_response}

設定Freeradius sql串連資訊:

cat /etc/raddb/sql.conf database = "mysql"driver = "rlm_sql_${database}"server = "localhost"#port = 3306login = "radius"password = "radiupass"radius_db = "radius"

安裝DaloRADIUS:

wget http://downloads.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gztar zxvf daloradius-0.9-9.tar.gz mv daloradius-0.9-9 /var/www/html/daloradiuschown -R apache:apache /var/www/html/daloradius

建立資料庫並匯入:

mysql -u root -pmysql>create database radius;mysql>grant all on radius.* to radius@localhost identified by "radpass"; mysql>exit;mysql -uroot -p radius < /var/www/html/daloradius/contrib/db/mysql-daloradius.sql mysql -uroot -p radius < /var/www/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql

配置DaloRADIUS:

cat cat /var/www/html/daloradius/library/daloradius.conf.php$configValues['CONFIG_DB_ENGINE'] = 'mysql';$configValues['CONFIG_DB_HOST'] = 'localhost';$configValues['CONFIG_DB_PORT'] = '3306';$configValues['CONFIG_DB_USER'] = 'radius';$configValues['CONFIG_DB_PASS'] = 'radpass';$configValues['CONFIG_DB_NAME'] = 'radius';$configValues['CONFIG_PATH_DALO_VARIABLE_DATA'] = '/var/www/daloradius/var'; #如在別目錄需修改

添加RADIUS用戶端:

cat /etc/raddb/clients.confclient 192.168.1.21 {secret = rootshortname = ROS}

通過瀏覽器訪問http://www.haiyun.me/daloradius即可登入管理,預設帳號:administrator,密碼:radius。
Daloradius建立使用者測試,ROS端配置RADIUS請參考:安裝Radiusmanager做為ROS驗證伺服器。

通過Daloradius管理介面可查看線上使用者:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.