radius add nas record to nas table fail
radius add nas record to nas table fail
my compony has a radius that was used to auth, now I want to use that to strongswan vpn , and after I config the strongswan,I config the radius that add nas table a record like
10 | 172.16.2.10 | hlg-vpn | other | NULL | testing | NULL | NULL | RADIUS Client |
and ok, the 172.16.2.10 is the ipaddress of the strongswan server, and the nas table also contain others nas records those work fine .
the record I add to nas table seems doesn't work. when I auth the vpn with a radius account, the radius log is like
Sat Jun 24 20:34:45 2017 : Error: Ignoring request to authentication address * port 1812 from unknown client 172.16.2.10 port 48394
Sat Jun 24 20:34:47 2017 : Error: Ignoring request to authentication address * port 1812 from unknown client 172.16.2.10 port 48394
Sat Jun 24 20:34:50 2017 : Error: Ignoring request to authentication address * port 1812 from unknown client 172.16.2.10 port 48394
Sat Jun 24 20:34:54 2017 : Error: Ignoring request to authentication address * port 1812 from unknown client 172.16.2.10 port 48394
I'm new to radius, am I lose config something after add a nas record to nas table? could someone tell me why , thanks..
something else, I am sure the other nas record in the table work fine, because , the config seems true, and I don't find any other config like those nas records in the raddb directory, also, I google it , the config file sql.conf point out that nas table is in use.
2 Answers
2
On the RADIUS server you need to define a list of RADIUS clients the server will accept packets from.
There are two reasons you need to define clients:
RADIUS packets use a PSK (Pre-Shared key) for encrypting certain attributes and preventing packet modification. For security, each client should use a different PSK. The client definitions associate different secrets with different client's IP addresses.
Processing RADIUS packets can sometimes be expensive in terms of the load on backend databases. It's useful to define ACLs which drop RADIUS packets before any processing is done. In FreeRADIUS unless an IP address is matched by a client definition the packet will be discarded.
Client definitions can be created in multiple ways, but the easiest is with the raddb/clients.conf
file (or freeradius/clients.conf
on debian).
raddb/clients.conf
freeradius/clients.conf
A client entry that'd match your SQL record would be:
client hlg-vpn {
ipaddr = 127.16.2.10
secret = testing
}
If you want to continue using SQL based clients, then check the read_clients
pair in the sql module's config is uncommented and set to yes:
read_clients
and that the sql
module is listed/uncommented in at least one authorize
, accounting
, post-auth
etc... section. Or is listed in the instantiate {}
section in raddb/radiusd.conf
.
sql
authorize
accounting
post-auth
instantiate {}
raddb/radiusd.conf
Another thing to check is that the "server" field for each NAS is filled out and matches the virtual-server with which this NAS is to be used. If you only have the "default" virtual server enabled in "sites-enabled" then set this field to "default".
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment