Ipv6 + Radius 3 Development
Это процесс разработки!
Установка Radius
apt install freeradius-mysql
rm /etc/freeradius/3.0/sites-enabled/default
cp /usr/local/nodeny/etc/raddb/clients.conf /etc/freeradius/3.0/
Конфигурирование
nano /etc/freeradius/3.0/sites-enabled/nodeny
Вставляем следующий текст:
server default { listen { type = auth ipaddr = * port = 1812 } listen { type = acct ipaddr = * port = 0 } authorize { sql update control { Auth-Type := Accept } } authenticate { } preacct { acct_unique preprocess } accounting { sql } session { radutmp sql } post-auth { sql } Post-Auth-Type ACCEPT { sql } }
Sql конфиг
В консоли:
nano /etc/freeradius/3.0/mods-enabled/sql
Вставляем следующий текст:
sql { driver = "rlm_sql_mysql" mysql { warnings = auto } server = "localhost" port = 3306 login = "nodeny" password = "hardpass" radius_db = "nodeny" read_groups = no authorize_reply_query = "call radreply('%{User-Name}', '%{NAS-IP-Address}')" accounting { reference = "%{tolower:type.%{Acct-Status-Type}.query}" type { start { query = "call radupdate('%{ERX-Dhcp-Mac-Addr}','%{Framed-IP-Address}',\ 'nas=%{NAS-IP-Address};ses=%{Acct-Session-Id}')" } interim-update { query = "${..start.query}" } stop { query = "call radstop('%{Framed-IP-Address}', '%{NAS-IP-Address}')" } } } post-auth { query = "call radupdate('%{ERX-Dhcp-Mac-Addr}','%{reply:Framed-IP-Address}',\ 'nas=%{NAS-IP-Address};ses=%{Acct-Session-Id};first_response=1')" } pool { start = 5 min = 5 max = 130 spare = 30 uses = 0 retry_delay = 30 lifetime = 0 idle_timeout = 60 } }