Eu instalei o freeradius no Centos.
O banco de dados MySQL é preenchido com alguns dados para testes, e o freeradiusd.conf e o sql.conf estão configurados.
O servidor RADIUS é capaz de se conectar com o banco de dados MySQL, e eu posso autenticar usuários a partir dele. Eu também tenho um cliente RADIUS remoto configurado que está trabalhando com o meu portal cativo e servidor RADIUS, no entanto, ele só funciona quando eu tenho o endereço IP do cliente configurado em /etc/raddb/clients.conf
. Não funciona usando a tabela 'nas' do MySQL.
Em outras palavras, o freeradius parece não estar consultando minha tabela nas do banco de dados MySQL.
No meu arquivo /etc/raddb/mods-enabled/sql
, tenho o seguinte:
# Table to keep radius client info
nas_table = "nas"
# Set to 'yes' to read radius clients from the database ('nas' table)
read_clients = yes
Na minha tabela nas eu tenho o seguinte:
id nasname shortname type ports secret server community description
1 xx.xx.xx.xx NULL other NULL testing123
default NULL RADIUS Client
... onde xx.xx.xx.xx é o endereço IP correto do meu cliente RADIUS.
Quando tento efetuar login pelo portal cativo, com o freeradius sendo executado no modo de depuração, recebo o seguinte:
Wed Aug 8 06:39:11 2018 : Info: Ready to process requests
Wed Aug 8 06:39:19 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:19 2018 : Info: Ready to process requests
Wed Aug 8 06:39:21 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:21 2018 : Info: Ready to process requests
Wed Aug 8 06:39:24 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:24 2018 : Info: Ready to process requests
eWed Aug 8 06:39:28 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Eu notei na saída de depuração que os dados nas nas estão sendo carregados
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Reserved connection (0)
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Executing select query: SELECT id, nasname, shortname, type, secret, server FROM nas
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Adding client xx.xx.xx.xx (xx.xx.xx.xx) to default clients list
Wed Aug 8 09:07:58 2018 : Debug: Adding client xx.xx.xx.xx/32 (xx.xx.xx.xx) to prefix tree 32
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (xx.xx.xx.xx): Client "xx.xx.xx.xx" (sql) added
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Released connection (0)
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "pap" from file /etc/raddb/mods-enabled/pap
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "reject" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "fail" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "ok" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "handled" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "invalid" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "userlock" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "notfound" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "noop" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "updated" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "monthlycounter" from file /etc/raddb/mods-enabled/sqlcounter
Qualquer ajuda seria muito apprciated! PS: Eu tentei mudar o nome curto na tabela nas o mesmo que o ip, mas ainda não funcionou
Tags linux centos freeradius