retailnext / node-radius

Node.js RADIUS library for packet encoding and decoding.
Other
200 stars 60 forks source link

Can we use it instead of FreeRadius ? #37

Closed Krunalvaghasiya closed 7 years ago

Krunalvaghasiya commented 7 years ago

We are developing Guest WiFi Solutions So we want to do authentication & accounting too. also want Speed control & Time duration. Can we use it in these purpose ?.. We want Radius into node js with Mongodb database backend .

muirdm commented 7 years ago

Yes, that is what this library is designed for. This library only provides encoding and decoding of RADIUS packets, so you need to hook up all the other application logic.

gjongenelen commented 6 years ago

So, I'm trying to do this, using Unifi AP's. But none of the devices are able to login, while a radtest works great. Do I need a bit of TLS? What could be the problem? The Access-request package does not contain a password-field.

muirdm commented 6 years ago

Can you include a dump of the packet?

gjongenelen commented 6 years ago

Of course:

{ 'User-Name': 'xxxxxxxx',
  'NAS-IP-Address': '172.16.10.13',
  'NAS-Identifier': 'f09fc2734187',
  'NAS-Port': 0,
  'Called-Station-Id': 'F0-9F-C2-75-41-87:SSID+',
  'Calling-Station-Id': 'B8-53-AC-14-4D-7D',
  'Framed-MTU': 1400,
  'NAS-Port-Type': 'Wireless-802.11',
  'Connect-Info': 'CONNECT 0Mbps 802.11b',
  'EAP-Message': <Buffer xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx>,
  'Message-Authenticator': <Buffer xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx> }

I replace buffer contents because I don't really know what is in it 😄

muirdm commented 6 years ago

Looks like your network is using EAP. This library doesn't have any direct support for handling EAP messages, so you will need to do that yourself or use another package.