your_bad_boy
your_bad_boy

Reputation: 31

Limit connections per user using FreeRADIUS

I'm here because after a good time searching how to limit the simultaneous connections of a user with FreeRADIUS I haven't achieved it...

My intention is that each user connects only once and that when they try to access again with that account, if it is already in use, it does not allow them to connect to the network, but I do not find how to do it??

Upvotes: 3

Views: 3320

Answers (1)

Olujoba Gbenga
Olujoba Gbenga

Reputation: 31

If you are authenticating your users from a database, just insert this to the radreply table for each user:

username = "ABC" i.e the username of the user

attribute = "Port-Limit" i.e Radius attribute for limiting simultaneous connections

op = ":=" i.e The radius operator

value = "1" i.e The number of simultaneous connections you want to allow for the user

See how it looks on my database

You can read more about Port-Limit here

You can read more about Radius attributes here too

Port-Limit Attribute: This Attribute sets the maximum number of ports to be provided to the user by the NAS. The value you set for this attribute will be sent by the server to the client in the Access-Accept packet

Upvotes: 3

Related Questions