HELP FreeRadius 2 +UTM5.2.1-007 помогите подружить их
HELP FreeRadius 2 +UTM5.2.1-007 помогите подружить их
всем привет! Сегодня решил подружить freeradius and utm5-007 установливал на CentOS5-4 так:
1 - ./configure --prefix=/opt/freeradius --with-rlm-mysql-lib-dir=/usr/lib/mysql —with-rlm-mysql-include-dir=/usr/include/mysql
2 — make all install
3 - root@cake# chown -R radiusd:radiusd /opt/freeradius
в конфиге radius.conf изменил следующие параметры
user и group = radiusd
(auth) listen port=1822
(accnt)listen port=1833
(log) request - раскоментировал
auth=yes , auth_badpass=yes, auth_goodpass=yes
Скажите куда мне теперь дальше копать?
Как протестить его работоспособность - и как я увижу что он заработал с UTM
1 - ./configure --prefix=/opt/freeradius --with-rlm-mysql-lib-dir=/usr/lib/mysql —with-rlm-mysql-include-dir=/usr/include/mysql
2 — make all install
3 - root@cake# chown -R radiusd:radiusd /opt/freeradius
в конфиге radius.conf изменил следующие параметры
user и group = radiusd
(auth) listen port=1822
(accnt)listen port=1833
(log) request - раскоментировал
auth=yes , auth_badpass=yes, auth_goodpass=yes
Скажите куда мне теперь дальше копать?
Как протестить его работоспособность - и как я увижу что он заработал с UTM
Последний раз редактировалось solomon Ср июл 07, 2010 08:17, всего редактировалось 1 раз.
Извините забыл сообщить данные CentOS UTM5.2.1-007
Если я правильно понял то код необходимо вписать в dialup.conf.....
Скажите Уважаемый Magnum72 если я приведу ваш запрос оптимизированный ds'ом к такому виду то значит ли это что фрирадиус будет работать как коробочный НЕТАПОВСКИЙ радиус? сможет ли он выдавать статические и динамические адреса при ВПН подключении? сильно не ругайте никогда с запросами в плотную не работал только начал изучать SQL язык
authorize_reply_query
еще вопрос назрел что значит inet_aton и 10.1.1.6
Если я правильно понял то код необходимо вписать в dialup.conf.....
Скажите Уважаемый Magnum72 если я приведу ваш запрос оптимизированный ds'ом к такому виду то значит ли это что фрирадиус будет работать как коробочный НЕТАПОВСКИЙ радиус? сможет ли он выдавать статические и динамические адреса при ВПН подключении? сильно не ругайте никогда с запросами в плотную не работал только начал изучать SQL язык
authorize_reply_query
Код: Выделить всё
Код:
SELECT g1.ip_group_id, g1.uname
FROM ip_groups g1, iptraffic_service_links i, service_links s, account_tariff_link a, tariffs t
WHERE ( g1.uname = 'user'
AND g1.is_deleted = '0'
AND i.ip_group_id = g1.ip_group_id
AND i.is_deleted = '0'
AND s.id = i.id
AND s.is_deleted = '0'
AND a.id = s.tariff_link_id
AND a.is_deleted = '0'
AND t.id = a.tariff_id )
AND (( AND ( g1.ab = '' OR g1.ab IS NULL ) AND ( g1.av != '2' OR g1.av IS NULL ))
OR (t.lan = '1'
AND ( g1.ab = '' OR g1.ab IS NULL ) AND ( g1.av != '2' OR g1.av IS NULL ))
OR ( g1.ab = '' OR g1.ab IS NULL AND g1.av = '1' )
OR (g1.ab != ''))
UNION SELECT g1.ip_group_id, g1.uname
FROM ip_groups g1
WHERE g1.uname = 'user'
AND g1.is_deleted = '0'
UNION SELECT g1.ip_group_id, g1.uname
FROM ip_groups g1
LEFT JOIN ip_groups g2
ON ( g1.rg = g2.rg
AND g2.ip = if( inet_aton( '10.1.1.6' ) <=2147483648, inet_aton( '10.1.1.6' ) , inet_aton( '10.1.1.6' ) - 0x100000000 )
AND g2.is_deleted = '0' )
LEFT JOIN ip_groups g3
ON ( g3.ip = if( inet_aton( '10.1.1.6' ) <=2147483648, inet_aton( '10.1.1.6' ) , inet_aton( '10.1.1.6' ) - 0x100000000 )
AND g3.freevpn = '1' AND g3.is_deleted = '0' )
WHERE g1.uname = 'user'
AND g1.is_deleted = '0'
AND ( g1.freevpn = '' OR g1.freevpn IS NULL )
AND ( g1.ab = '' OR g1.ab IS NULL )
AND ( g1.av != '2' OR g1.av IS NULL )
AND ( g1.freevpn = '' OR g1.freevpn IS NULL )
AND ( g3.freevpn = '' OR g3.freevpn IS NULL )
AND g2.ip IS NULL
UNION SELECT g1.ip_group_id, g1.uname, 'Framed-IP-Address', inet_aton( g1.ip & 0xFFFFFFFF ) AS a, ':='
FROM ip_groups g1
LEFT JOIN ip_groups g2
ON ( g1.rg = g2.rg
AND g2.ip = if( inet_aton( '10.1.1.6' ) <=2147483648, inet_aton( '10.1.1.6' ) , inet_aton( '10.1.1.6' ) - 0x100000000 )
AND g2.is_deleted = '0' )
LEFT JOIN ip_groups g3
ON ( g3.ip = if( inet_aton( '10.1.1.6' ) <=2147483648, inet_aton( '10.1.1.6' ) , inet_aton( '10.1.1.6' ) - 0x100000000 )
AND g3.freevpn = '1'
AND g3.is_deleted = '0' )
WHERE g1.uname = 'user'
AND g1.is_deleted = '0'
AND ( g1.ab = '' OR g1.ab IS NULL ) AND ( g1.av = '' OR g1.av IS NULL )
AND ( g2.id IS NOT NULL OR g1.freevpn = '1' OR g3.ip IS NOT NULL )
AND ( g1.av IS NULL OR g1.av != '2' )
authorize_check_query
Код:
SELECT i.ip_group_id, i.uname, 'Password', i.upass, ':='
FROM ip_groups i
WHERE i.uname = 'user'
AND i.is_deleted = '0'
AND ( i.av IS NULL OR i.av != '2' )
AND 'user' != ''
UNION SELECT '1000', 'user', 'Simultaneous-Use', '1', ':=' FROM ip_groups WHERE uname='user';
хелп!!! запустил freeradius
запускаю radtest - выдает ошибки - объясните плиз что за ошибки
[
запускаю radtest - выдает ошибки - объясните плиз что за ошибки
[
Код: Выделить всё
root@admin bin]# ./radtest test test 127.0.0.1 2 test
Sending Access-Request of id 118 to 127.0.0.1 port 1812
User-Name = "test"
User-Password = "test"
NAS-IP-Address = 127.0.0.1
NAS-Port = 2
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=118, length=20
rad_verify: Received Access-Reject packet from client 127.0.0.1 port 1812 with invalid signature (err=2)! (Shared secret is incorrect.)
Sending Access-Request of id 118 to 127.0.0.1 port 1812
User-Name = "test"
User-Password = "test"
NAS-IP-Address = 127.0.0.1
NAS-Port = 2
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=118, length=20
rad_verify: Received Access-Reject packet from client 127.0.0.1 port 1812 with invalid signature (err=2)! (Shared secret is incorrect.)
Sending Access-Request of id 118 to 127.0.0.1 port 1812
User-Name = "test"
User-Password = "test"
NAS-IP-Address = 127.0.0.1
NAS-Port = 2
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=118, length=20
rad_verify: Received Access-Reject packet from client 127.0.0.1 port 1812 with invalid signature (err=2)! (Shared secret is incorrect.)
radclient: no response from server for ID 118 socket 4
Пожалуйста помогите разобраться с настройка вношу изменения в dialup.conf
viewtopic.php?t=2518&highlight=freeradius+sql
Вот что он мне говорит
viewtopic.php?t=2518&highlight=freeradius+sql
Вот что он мне говорит
Код: Выделить всё
rad_recv: Access-Request packet from host 172.16.2.40 port 1645, id=21, length=138
Framed-Protocol = PPP
User-Name = "vlad"
MS-CHAP-Challenge = 0xd21158a08b74e1aeef47a54468f7bf7b
MS-CHAP2-Response = 0x01bf598b922c56c5d1e04a804a93df9fd82eb702000000295a6f72fd436d98cdb3fa4d6130d226abc1713ab90cbbd2b9260e
NAS-Port-Type = Virtual
NAS-Port = 21
Service-Type = Framed-User
NAS-IP-Address = 172.16.2.40
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
[mschap] Found MS-CHAP attributes. Setting 'Auth-Type = mschap'
++[mschap] returns ok
[suffix] No '@' in User-Name = "vlad", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[files] users: Matched entry DEFAULT at line 179
++[files] returns ok
++[expiration] returns noop
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user. Authentication may fail because of this.
++[pap] returns noop
Found Auth-Type = MSCHAP
+- entering group MS-CHAP {...}
[mschap] No Cleartext-Password configured. Cannot create LM-Password.
[mschap] No Cleartext-Password configured. Cannot create NT-Password.
[mschap] Told to do MS-CHAPv2 for vlad with NT-Password
[mschap] FAILED: No NT/LM-Password. Cannot perform authentication.
[mschap] FAILED: MS-CHAP2-Response is incorrect
++[mschap] returns reject
Failed to authenticate the user.
Login incorrect: [vlad/<via Auth-Type = mschap>] (from client cisco3660 port 21)
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> vlad
attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 21 to 172.16.2.40 port 1645
Waking up in 4.9 seconds.
Cleaning up request 0 ID 21 with timestamp +20
Ready to process requests.
Знаю есть здесь гуру которые могут помочь
но вот не получается уменя настроить фрирадиус с мускулем
основа моих действий - http://www.lissyara.su/articles/freebsd ... ty/mpd_10/
мои дейтсвия
Вот что в дебаге пишет
Не пойму вроде у всех получается - по тем же манам ставлю - у меня не выходит
Правда в основном все ставят freeradius 1 - там не большие отличия
но вот не получается уменя настроить фрирадиус с мускулем
основа моих действий - http://www.lissyara.su/articles/freebsd ... ty/mpd_10/
мои дейтсвия
Код: Выделить всё
1 - yum install freeradius2 freeradius2-mysql freeradius2-utils
2 - во т по этому мануалу проверил локального не скьэльного пользователя все гут - http://wiki.dodex.org/2009/07/21/freeradiusmysql/
3 - mysql -u root
> CREATE DATABASE radius;
> CRANT ALL PRIVILEGES ON radius.* TO radius@localhost IDENTIFIED BY "123";
Поскольку при установке в examples у меня не появился дамп мускульной базы скачал фрирадиус версии 2-0-0 пре1 от куад и взял дамп
mysql -u root radius < /tmp/examples/mysql.sql
>INSERT INTO radcheck (UserName, Attribute, op, Value) VALUES ('testsql', 'Cleartext-Password', ':=', 'test123');
>INSERT INTO radreply (UserName, Attribute, op, Value) VALUES ('testsql', 'Framed-IP-Address', '=', '192.168.1.13');
>INSERT INTO radreply (UserName, Attribute, op, Value) VALUES ('testsql', 'Framed-IP-Netmask', '=', '255.255.255.255');
> INSERT INTO radreply (UserName, Attribute, op, Value) VALUES ('testsql', 'Framed-Protocol', '=', 'PPP');
> select * from radreply where UserName = 'testsql'; - проверил введеные данные
mysql> select * from radreply;
+----+----------+-------------------+----+-----------------+
| id | UserName | Attribute | op | Value |
+----+----------+-------------------+----+-----------------+
| 1 | testsql | Framed-IP-Address | = | 192.168.1.13 |
| 2 | testsql | Framed-IP-Netmask | = | 255.255.255.255 |
| 3 | testsql | Framed-Protocol | = | PPP |
+----+----------+-------------------+----+-----------------+
3 rows in set (0.00 sec)
>mysql> select id, UserName, Attribute, op, value FROM radcheck;
+----+----------+--------------------+----+---------+
| id | UserName | Attribute | op | value |
+----+----------+--------------------+----+---------+
| 1 | testsql | Cleartext-Password | := | test123 |
+----+----------+--------------------+----+---------+
4 - раскоментировал sql в raddb/sites-available/default в секциях authorize{}, accounting{}, session{}, post-auth{}
5 - d radius.conf раскоментировал $INCLUDE sql.conf
6 - /usr/sbin/./radiusd -X
7 - в другой консоли тестирую /usr/bin/./radtest testsql test123 localhost 1812 123
Вот что в дебаге пишет
Код: Выделить всё
Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1 port 49296, id=220, length=59
User-Name = "testsql"
User-Password = "test123"
NAS-IP-Address = 127.0.0.1
NAS-Port = 1812
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] No '@' in User-Name = "testsql", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
[sql] expand: %{User-Name} -> testsql
[sql] sql_set_user escaped user --> 'testsql'
rlm_sql (sql): Reserving sql socket id: 3
[sql] expand: SELECT id, username, attribute, op, value FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, op, value FROM radcheck WHERE username = 'testsql' ORDER BY id
rlm_sql: Invalid operator "test123" for attribute Cleartext-Password
rlm_sql (sql): Error getting data from database
[sql] SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 3
++[sql] returns fail
Invalid user: [testsql/test123] (from client localhost port 1812)
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> testsql
attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 220 to 127.0.0.1 port 49296
Waking up in 4.9 seconds.
Не пойму вроде у всех получается - по тем же манам ставлю - у меня не выходит
Правда в основном все ставят freeradius 1 - там не большие отличия
Код: Выделить всё
freeradius 2
shad Auth-Type = Local, Cleartext-Password := "test"
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 192.168.0.7,
Framed-IP-Netmask = 255.255.255.0,
freeradius 1
shad Auth-Type := Local, User-Password == “test”
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 192.168.0.7,
Framed-IP-Netmask = 255.255.255.0
после определенных настроек вроде как в дампе авторизуется и кушает даже пароль но вот аксес-акцепт выдавать не хочет (((
Такое чувство что вот вот получится - кажется всего не чего - я вот еще чап и мсчап не настраивал... думаю для локальных тестов они не нужны?[/code]
Код: Выделить всё
Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1 port 50103, id=157, length=59
User-Name = "testing"
User-Password = "777"
NAS-IP-Address = 127.0.0.1
NAS-Port = 1812
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] No '@' in User-Name = "testing", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
[sql] expand: %{User-Name} -> testing
[sql] sql_set_user escaped user --> 'testing'
rlm_sql (sql): Reserving sql socket id: 3
[sql] expand: SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'testing' ORDER BY id
[sql] User found in radcheck table
[sql] expand: SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radreply WHERE username = 'testing' ORDER BY id
[sql] expand: SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT groupname FROM radusergroup WHERE username = 'testing' ORDER BY priority
[sql] expand: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'static' ORDER BY id
[sql] User found in group static
[sql] expand: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = 'static' ORDER BY id
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns updated
Found Auth-Type = PAP
+- entering group PAP {...}
[pap] login attempt with password "777"
[pap] Using clear text password "777"
[pap] User authenticated successfully
++[pap] returns ok
Login OK: [testing] (from client localhost port 1812)
+- entering group post-auth {...}
[sql] expand: %{User-Name} -> testing
[sql] sql_set_user escaped user --> 'testing'
[sql] expand: %{User-Password} -> 777
[sql] expand: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S') -> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'testing', '777', 'Access-Accept', '2010-07-08 14:50:49')
rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'testing', '777', 'Access-Accept', '2010-07-08 14:50:49')
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql_mysql: MYSQL check_error: 1054 received
rlm_sql (sql) in sql_postauth: Database query error - Unknown column 'username' in 'field list'
rlm_sql (sql): Released sql socket id: 2
++[sql] returns fail
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> testing
attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 157 to 127.0.0.1 port 50103
Waking up in 4.9 seconds.
Cleaning up request 0 ID 157 with timestamp +9
Ready to process requests.
Такое чувство что вот вот получится - кажется всего не чего - я вот еще чап и мсчап не настраивал... думаю для локальных тестов они не нужны?[/code]
нашел в чем затык не зная для чего нужен post-auth расскоментировал sql в /raddb/sites-enable/default ))))
это мой первый опыт настройки freeradius2 - в инете в основном настройки под первую версию, немного сначала путался а теперь понял что к чему))))
Ну чтож приступлю к привязке к биллингу )))) удачи мне в бою )))
Код: Выделить всё
[root@admin radius]# /usr/bin/./radtest testing 777 127.0.0.1 1812 123
Sending Access-Request of id 194 to 127.0.0.1 port 1812
User-Name = "testing"
User-Password = "777"
NAS-IP-Address = 127.0.0.1
NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=194, length=50
Framed-IP-Address = 1.1.1.1
Framed-IP-Netmask = 255.255.255.255
Framed-Protocol = PPP
Service-Type = Framed-User
Framed-Compression = Van-Jacobson-TCP-IP
Ну чтож приступлю к привязке к биллингу )))) удачи мне в бою )))
Дружисче в нашей области все знать не возможно, квалификация приходит с опытом, иногда некоторым не квалифицированным специалистам необходимо срочно поднять проект - но по пральному на изучение уйдет куча времени, только по этому и спрашивают я так думаю.... поставив проект ччеловек будет саморазвиваться и познает сей инстремент - так как его необходимо будет ему же и поддерживать (это конечно мое сугубо личное мнение),gil писал(а):Пишите больше все, вдруг тут кто еще на кваллифицированной рабочей силе экономить пытается.
Я как раз неквалифицированный спец. ставил фрирадиус нагуглив вроде кое что полезное и конечно же прокурив сам офф сайт... В sql язык изучаю плотно в личное время от работы... поэтому бывают вопросы... да и траблы у меня с буржуйским языком - что в школе что в колледже что в универе изучал немецкий - поэтому приходится пользоваться переводчиком гугла и по смыслу догадываться что куда втыкать ))))
Господа успешные тесты авторизации локального пользователя в базе мускульной - это были последние успешные мои рывки - выкурил весь форум (((( ну не получается завязать с биллингом
Скажите пожалуйста какие конфиги необходимо мне править куда что внести - все способы перепробывал с этого форума (((( ужо отчаялся в конец
Есть на тестовом компе ( Centos 5.5 UTM5.2.1-007 Freeradius 2.1.7 ) клиентом является Cisco 3660 (172.16.x.y)
Мне необходимо чтобы хотя бы функциональность штатного сохранилась, выдача статических и динамических белых IP по VPN
Если не трудно киньте плиз рабочие конфиги на мыло - soloman1 (a) rambler.ru
Скажите пожалуйста какие конфиги необходимо мне править куда что внести - все способы перепробывал с этого форума (((( ужо отчаялся в конец
Есть на тестовом компе ( Centos 5.5 UTM5.2.1-007 Freeradius 2.1.7 ) клиентом является Cisco 3660 (172.16.x.y)
Мне необходимо чтобы хотя бы функциональность штатного сохранилась, выдача статических и динамических белых IP по VPN
Если не трудно киньте плиз рабочие конфиги на мыло - soloman1 (a) rambler.ru
радиус поставил настрои вот по этому ману - при запуске ошибок не выдал
пытался подключиться пользователем со статическим адресом 95.215.
вот как выругался - как это лечить?
Код: Выделить всё
Starting - reading configuration files ...
including configuration file /opt/freeradius/etc/raddb/radiusd.conf
including configuration file /opt/freeradius/etc/raddb/proxy.conf
including configuration file /opt/freeradius/etc/raddb/clients.conf
including files in directory /opt/freeradius/etc/raddb/modules/
including configuration file /opt/freeradius/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /opt/freeradius/etc/raddb/modules/sql_log
including configuration file /opt/freeradius/etc/raddb/modules/counter
including configuration file /opt/freeradius/etc/raddb/modules/acct_unique
including configuration file /opt/freeradius/etc/raddb/modules/unix
including configuration file /opt/freeradius/etc/raddb/modules/attr_rewrite
including configuration file /opt/freeradius/etc/raddb/modules/echo
including configuration file /opt/freeradius/etc/raddb/modules/sradutmp
including configuration file /opt/freeradius/etc/raddb/modules/detail
including configuration file /opt/freeradius/etc/raddb/modules/realm
including configuration file /opt/freeradius/etc/raddb/modules/chap
including configuration file /opt/freeradius/etc/raddb/modules/always
including configuration file /opt/freeradius/etc/raddb/modules/ippool
including configuration file /opt/freeradius/etc/raddb/modules/exec
including configuration file /opt/freeradius/etc/raddb/modules/preprocess
including configuration file /opt/freeradius/etc/raddb/modules/files
including configuration file /opt/freeradius/etc/raddb/modules/smsotp
including configuration file /opt/freeradius/etc/raddb/modules/mschap
including configuration file /opt/freeradius/etc/raddb/modules/krb5
including configuration file /opt/freeradius/etc/raddb/modules/radutmp
including configuration file /opt/freeradius/etc/raddb/modules/expiration
including configuration file /opt/freeradius/etc/raddb/modules/detail.log
including configuration file /opt/freeradius/etc/raddb/modules/mac2ip
including configuration file /opt/freeradius/etc/raddb/modules/cui
including configuration file /opt/freeradius/etc/raddb/modules/attr_filter
including configuration file /opt/freeradius/etc/raddb/modules/etc_group
including configuration file /opt/freeradius/etc/raddb/modules/logintime
including configuration file /opt/freeradius/etc/raddb/modules/expr
including configuration file /opt/freeradius/etc/raddb/modules/mac2vlan
including configuration file /opt/freeradius/etc/raddb/modules/perl
including configuration file /opt/freeradius/etc/raddb/modules/wimax
including configuration file /opt/freeradius/etc/raddb/modules/pap
including configuration file /opt/freeradius/etc/raddb/modules/checkval
including configuration file /opt/freeradius/etc/raddb/modules/detail.example.com
including configuration file /opt/freeradius/etc/raddb/modules/ntlm_auth
including configuration file /opt/freeradius/etc/raddb/modules/smbpasswd
including configuration file /opt/freeradius/etc/raddb/modules/policy
including configuration file /opt/freeradius/etc/raddb/modules/passwd
including configuration file /opt/freeradius/etc/raddb/modules/pam
including configuration file /opt/freeradius/etc/raddb/modules/ldap
including configuration file /opt/freeradius/etc/raddb/modules/otp
including configuration file /opt/freeradius/etc/raddb/modules/linelog
including configuration file /opt/freeradius/etc/raddb/modules/digest
including configuration file /opt/freeradius/etc/raddb/modules/inner-eap
including configuration file /opt/freeradius/etc/raddb/eap.conf
including configuration file /opt/freeradius/etc/raddb/sql.conf
including configuration file /opt/freeradius/etc/raddb/sql/mysql/dialup.conf
including configuration file /opt/freeradius/etc/raddb/policy.conf
including files in directory /opt/freeradius/etc/raddb/sites-enabled/
including configuration file /opt/freeradius/etc/raddb/sites-enabled/inner-tunnel
including configuration file /opt/freeradius/etc/raddb/sites-enabled/default
including configuration file /opt/freeradius/etc/raddb/sites-enabled/control-socket
main {
allow_core_dumps = no
}
including dictionary file /opt/freeradius/etc/raddb/dictionary
main {
prefix = "/opt/freeradius"
localstatedir = "/opt/freeradius/var"
logdir = "/opt/freeradius/var/log/radius"
libdir = "/opt/freeradius/lib"
radacctdir = "/opt/freeradius/var/log/radius/radacct"
hostname_lookups = no
max_request_time = 30
cleanup_delay = 5
max_requests = 1024
pidfile = "/opt/freeradius/var/run/radiusd/radiusd.pid"
checkrad = "/opt/freeradius/sbin/checkrad"
debug_level = 0
proxy_requests = yes
log {
stripped_names = no
auth = no
auth_badpass = no
auth_goodpass = no
}
security {
max_attributes = 200
reject_delay = 1
status_server = yes
}
}
radiusd: #### Loading Realms and Home Servers ####
proxy server {
retry_delay = 5
retry_count = 3
default_fallback = no
dead_time = 120
wake_all_if_all_dead = no
}
home_server localhost {
ipaddr = 127.0.0.1
port = 1812
type = "auth"
secret = "testing123"
response_window = 20
max_outstanding = 65536
require_message_authenticator = no
zombie_period = 40
status_check = "status-server"
ping_interval = 30
check_interval = 30
num_answers_to_alive = 3
num_pings_to_alive = 3
revive_interval = 120
status_check_timeout = 4
irt = 2
mrt = 16
mrc = 5
mrd = 30
}
home_server_pool my_auth_failover {
type = fail-over
home_server = localhost
}
realm example.com {
auth_pool = my_auth_failover
}
realm LOCAL {
}
radiusd: #### Loading Clients ####
client cisco3660 {
ipaddr = 172.16.2.40
netmask = 32
require_message_authenticator = no
secret = "secret"
shortname = "cisco"
nastype = "cisco"
}
client localhost {
ipaddr = 127.0.0.1
require_message_authenticator = no
secret = "testing123"
nastype = "other"
}
radiusd: #### Instantiating modules ####
instantiate {
Module: Linked to module rlm_exec
Module: Instantiating exec
exec {
wait = no
input_pairs = "request"
shell_escape = yes
}
Module: Linked to module rlm_expr
Module: Instantiating expr
Module: Linked to module rlm_expiration
Module: Instantiating expiration
expiration {
reply-message = "Password Has Expired "
}
Module: Linked to module rlm_logintime
Module: Instantiating logintime
logintime {
reply-message = "You are calling outside your allowed timespan "
minimum-timeout = 60
}
}
radiusd: #### Loading Virtual Servers ####
server inner-tunnel {
modules {
Module: Checking authenticate {...} for more modules to load
Module: Linked to module rlm_pap
Module: Instantiating pap
pap {
encryption_scheme = "auto"
auto_header = no
}
Module: Linked to module rlm_chap
Module: Instantiating chap
Module: Linked to module rlm_mschap
Module: Instantiating mschap
mschap {
use_mppe = yes
require_encryption = no
require_strong = no
with_ntdomain_hack = no
}
Module: Linked to module rlm_unix
Module: Instantiating unix
unix {
radwtmp = "/opt/freeradius/var/log/radius/radwtmp"
}
Module: Linked to module rlm_eap
Module: Instantiating eap
eap {
default_eap_type = "md5"
timer_expire = 60
ignore_unknown_eap_types = no
cisco_accounting_username_bug = no
max_sessions = 4096
}
Module: Linked to sub-module rlm_eap_md5
Module: Instantiating eap-md5
Module: Linked to sub-module rlm_eap_leap
Module: Instantiating eap-leap
Module: Linked to sub-module rlm_eap_gtc
Module: Instantiating eap-gtc
gtc {
challenge = "Password: "
auth_type = "PAP"
}
Module: Linked to sub-module rlm_eap_tls
Module: Instantiating eap-tls
tls {
rsa_key_exchange = no
dh_key_exchange = yes
rsa_key_length = 512
dh_key_length = 512
verify_depth = 0
pem_file_type = yes
private_key_file = "/opt/freeradius/etc/raddb/certs/server.pem"
certificate_file = "/opt/freeradius/etc/raddb/certs/server.pem"
CA_file = "/opt/freeradius/etc/raddb/certs/ca.pem"
private_key_password = "whatever"
dh_file = "/opt/freeradius/etc/raddb/certs/dh"
random_file = "/opt/freeradius/etc/raddb/certs/random"
fragment_size = 1024
include_length = yes
check_crl = no
cipher_list = "DEFAULT"
make_cert_command = "/opt/freeradius/etc/raddb/certs/bootstrap"
cache {
enable = no
lifetime = 24
max_entries = 255
}
}
Module: Linked to sub-module rlm_eap_ttls
Module: Instantiating eap-ttls
ttls {
default_eap_type = "md5"
copy_request_to_tunnel = no
use_tunneled_reply = no
virtual_server = "inner-tunnel"
include_length = yes
}
Module: Linked to sub-module rlm_eap_peap
Module: Instantiating eap-peap
peap {
default_eap_type = "mschapv2"
copy_request_to_tunnel = no
use_tunneled_reply = no
proxy_tunneled_request_as_eap = yes
virtual_server = "inner-tunnel"
}
Module: Linked to sub-module rlm_eap_mschapv2
Module: Instantiating eap-mschapv2
mschapv2 {
with_ntdomain_hack = no
}
Module: Checking authorize {...} for more modules to load
Module: Linked to module rlm_realm
Module: Instantiating suffix
realm suffix {
format = "suffix"
delimiter = "@"
ignore_default = no
ignore_null = no
}
Module: Linked to module rlm_files
Module: Instantiating files
files {
usersfile = "/opt/freeradius/etc/raddb/users"
acctusersfile = "/opt/freeradius/etc/raddb/acct_users"
preproxy_usersfile = "/opt/freeradius/etc/raddb/preproxy_users"
compat = "no"
}
Module: Checking session {...} for more modules to load
Module: Linked to module rlm_radutmp
Module: Instantiating radutmp
radutmp {
filename = "/opt/freeradius/var/log/radius/radutmp"
username = "%{User-Name}"
case_sensitive = yes
check_with_nas = yes
perm = 384
callerid = yes
}
Module: Checking post-proxy {...} for more modules to load
Module: Checking post-auth {...} for more modules to load
Module: Linked to module rlm_attr_filter
Module: Instantiating attr_filter.access_reject
attr_filter attr_filter.access_reject {
attrsfile = "/opt/freeradius/etc/raddb/attrs.access_reject"
key = "%{User-Name}"
}
} # modules
} # server
server {
modules {
Module: Checking authenticate {...} for more modules to load
Module: Checking authorize {...} for more modules to load
Module: Linked to module rlm_preprocess
Module: Instantiating preprocess
preprocess {
huntgroups = "/opt/freeradius/etc/raddb/huntgroups"
hints = "/opt/freeradius/etc/raddb/hints"
with_ascend_hack = no
ascend_channels_per_line = 23
with_ntdomain_hack = no
with_specialix_jetstream_hack = no
with_cisco_vsa_hack = no
with_alvarion_vsa_hack = no
}
Module: Checking preacct {...} for more modules to load
Module: Linked to module rlm_acct_unique
Module: Instantiating acct_unique
acct_unique {
key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
}
Module: Checking accounting {...} for more modules to load
Module: Linked to module rlm_detail
Module: Instantiating detail
detail {
detailfile = "/opt/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
header = "%t"
detailperm = 384
dirperm = 493
locking = no
log_packet_header = no
}
Module: Linked to module rlm_perl
Module: Instantiating perl
perl {
module = "/opt/freeradius/etc/raddb/rad.pl"
func_authorize = "authorize"
func_authenticate = "authenticate"
func_accounting = "accounting"
func_preacct = "preacct"
func_checksimul = "checksimul"
func_detach = "detach"
func_xlat = "xlat"
func_pre_proxy = "pre_proxy"
func_post_proxy = "post_proxy"
func_post_auth = "post_auth"
func_recv_coa = "recv_coa"
func_send_coa = "send_coa"
}
DBI connect('database=UTM5;host=localhost','xxx',...) failed: Access denied for user 'xxx'@'localhost' (using password: YES) at /opt/freeradius/etc/raddb/rad.pl line 30
Module: Linked to module rlm_sql
Module: Instantiating sql
sql {
driver = "rlm_sql_mysql"
server = "localhost"
port = "3306"
login = "root"
password = ""
radius_db = "UTM5"
read_groups = yes
sqltrace = no
sqltracefile = "/opt/freeradius/var/log/radius/sqltrace.sql"
readclients = no
deletestalesessions = yes
num_sql_socks = 5
lifetime = 0
max_queries = 0
sql_user_name = "%{User-Name}"
default_user_profile = ""
nas_query = "SELECT id, nasname, shortname, type, secret, server FROM nas"
authorize_check_query = "SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id"
authorize_reply_query = "SELECT '','%{SQL-User-Name}','Framed-IP-Address',inet_ntoa( ip_groups.ip & 0xffffffff ) AS ip,'=' FROM UTM5.ip_groups WHERE uname ='%{SQL-User-Name}' AND is_deleted = '0' AND inet_ntoa( ip_groups.ip & 0xffffffff ) LIKE '95.215.%' UNION SELECT '', '%{SQL-User-Name}', 'Framed-Pool', 'mainpool', '=' FROM ip_groups WHERE uname ='%{SQL-User-Name}' AND inet_ntoa( ip_groups.ip & 0xffffffff ) NOT LIKE '95.215.%' UNION select '', '%{SQL-User-Name}', 'Mikrotik-Rate-Limit', radius_data.value, '=' FROM radius_data WHERE radius_data.owner_id=( select sl.service_id FROM ip_groups ig, iptraffic_service_links isl, service_links sl where ig.uname='%{SQL-User-Name}' and ig.is_deleted=0 and ig.ip_group_id=isl.ip_group_id and isl.is_deleted=0 and isl.id=sl.id and sl.is_deleted=0) AND radius_data.vendor=14988"
authorize_group_check_query = "SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id"
authorize_group_reply_query = "SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id"
accounting_onoff_query = " UPDATE radacct SET acctstoptime = '%S', acctsessiontime = unix_timestamp('%S') - unix_timestamp(acctstarttime), acctterminatecause = '%{Acct-Terminate-Cause}', acctstopdelay = %{%{Acct-Delay-Time}:-0} WHERE acctstoptime IS NULL AND nasipaddress = '%{NAS-IP-Address}' AND acctstarttime <= '%S'"
accounting_update_query = " UPDATE radacct SET framedipaddress = '%{Framed-IP-Address}', acctsessiontime = '%{Acct-Session-Time}', acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}'"
accounting_update_query_alt = " INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctsessiontime, acctauthentic, connectinfo_start, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, servicetype, framedprotocol, framedipaddress, acctstartdelay, xascendsessionsvrkey) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{%{Acct-Session-Time}:-0} + %{%{Acct-Delay-Time}:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{X-Ascend-Session-Svr-Key}')"
accounting_start_query = " INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay, xascendsessionsvrkey) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"
accounting_start_query_alt = " UPDATE radacct SET acctstarttime = '%S', acctstartdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_start = '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}'"
accounting_stop_query = " UPDATE radacct SET acctstoptime = '%S', acctsessiontime = '%{Acct-Session-Time}', acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', acctterminatecause = '%{Acct-Terminate-Cause}', acctstopdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_stop = '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}'"
accounting_stop_query_alt = " INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{%{Acct-Session-Time}:-0} + %{%{Acct-Delay-Time}:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{%{Acct-Delay-Time}:-0}')"
group_membership_query = "SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority"
connect_failure_retry_delay = 60
simul_count_query = ""
simul_verify_query = "SELECT radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, callingstationid, framedprotocol FROM radacct WHERE username = '%{SQL-User-Name}' AND acctstoptime IS NULL"
postauth_query = "INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')"
safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
}
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to root@localhost:3306/UTM5
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql): Connected new DB handle, #4
Module: Instantiating attr_filter.accounting_response
attr_filter attr_filter.accounting_response {
attrsfile = "/opt/freeradius/etc/raddb/attrs.accounting_response"
key = "%{User-Name}"
}
Module: Checking session {...} for more modules to load
Module: Checking post-proxy {...} for more modules to load
Module: Checking post-auth {...} for more modules to load
} # modules
} # server
radiusd: #### Opening IP addresses and Ports ####
listen {
type = "auth"
ipaddr = *
port = 0
}
listen {
type = "acct"
ipaddr = *
port = 0
}
listen {
type = "control"
listen {
socket = "/opt/freeradius/var/run/radiusd/radiusd.sock"
}
}
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /opt/freeradius/var/run/radiusd/radiusd.sock
Listening on proxy address * port 1814
Ready to process requests.
вот как выругался - как это лечить?
Код: Выделить всё
rad_recv: Access-Request packet from host 172.16.2.40 port 1645, id=138, length=138
Framed-Protocol = PPP
User-Name = "vlad"
MS-CHAP-Challenge = 0xd1f2fe9c5f4aa1cead2379be8a6ae54f
MS-CHAP2-Response = 0x01bfdabd0be37c2d5c5efed15c6ce3467d1db70200000029eacf00fc7cc54f1f5b8bf5b5fed79870fa21f98c3ed2f0451366
NAS-Port-Type = Virtual
NAS-Port = 140
Service-Type = Framed-User
NAS-IP-Address = 172.16.2.40
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
[mschap] Found MS-CHAP attributes. Setting 'Auth-Type = mschap'
++[mschap] returns ok
[suffix] No '@' in User-Name = "vlad", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[files] users: Matched entry DEFAULT at line 172
++[files] returns ok
++[expiration] returns noop
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user. Authentication may fail because of this.
++[pap] returns noop
Found Auth-Type = MSCHAP
+- entering group MS-CHAP {...}
[mschap] No Cleartext-Password configured. Cannot create LM-Password.
[mschap] No Cleartext-Password configured. Cannot create NT-Password.
[mschap] Told to do MS-CHAPv2 for vlad with NT-Password
[mschap] FAILED: No NT/LM-Password. Cannot perform authentication.
[mschap] FAILED: MS-CHAP2-Response is incorrect
++[mschap] returns reject
Failed to authenticate the user.
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> vlad
attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 138 to 172.16.2.40 port 1645
Waking up in 4.9 seconds.
Cleaning up request 0 ID 138 with timestamp +8
Ready to process requests.