RPI Failed to find virtual server
Having problems getting pfSense to communicate with FreeRadius on a Raspberry Pi 3 Model B.
My setup looks like this:
built on Wed May 03 15:13:29 CDT 2017
RPi 3 Model B (Rasparian PIXEL)
Freeradius version 3.0.13
Initially I setup the CP on pfSense without authentication, when connecting the portal login page is shown, click "login" and it works fine. So far so good… I have setup radius mysql db on the Pi, it is working fine to login with my test accounts using radtest. When starting FreeRadius in debug mode, this output is shown:
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on Localhost via UNIX socket, server version 5.5.54-0+deb8u1, protocol version 10
rlm_sql (sql): Processing generate_sql_clients
rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname, shortname, type, secret, server FROM nas
rlm_sql (sql): Reserved connection (0)
rlm_sql (sql): Executing select query: SELECT id, nasname, shortname, type, secret, server FROM nas
rlm_sql (sql): Adding client pfSense () to 192.168.225.1 clients list
Failed to find virtual server 192.168.225.1
Failed to add client, possible duplicate?
rlm_sql (sql): Released connection (0)
Further down it says:``` Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel Listening on auth address * port 1812 bound to server default Listening on acct address * port 1813 bound to server default Listening on auth address :: port 1812 bound to server default Listening on acct address :: port 1813 bound to server default Listening on proxy address * port 44560 Listening on proxy address :: port 41813 Ready to process requests
But when I try to login with my captive portal (192.168.225.1:8002), the output from the freeradius log says:```
Ignoring request to auth address * port 1812 bound to server default from unknown client 192.168.225.1 port 10838 proto udp
I have no idea why this happens, what have I missed? I believe it's firewall related (on the Pi?) but have no clue what to do. Any help is highly appreciated! Thanks!
Figured it out. In my nas table in the database, I thought "nasname" was a name/description of the NAS. Turned out to be the IP address, so after changing that everything is working as expected.