retailnext / node-radius

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

There is no password attr #54

Closed ghost closed 4 years ago

ghost commented 4 years ago

This is all data I get in a request:

{ 'Service-Type': 'Framed-User',
  'Framed-Protocol': 'PPP',
  'NAS-Port': 666,
  'NAS-Port-Type': 'Virtual',
  'User-Name': 'test',
  'Calling-Station-Id': '2.2.2.20',
  'Called-Station-Id': '2.2.2.2',
  'Vendor-Specific': {},
  'NAS-Identifier': 'MikroTik',
  'NAS-IP-Address': '3.3.3.3.' }

IP addresses are fake here. why I could not get password from microtik?

psanford commented 4 years ago

Presumably you are not seeing the User-Password attribute because your microtik device isn't sending it in that packet. It looks like the output you provided is only the packet.attributes. What is the packet.code value you are getting?

ghost commented 4 years ago

Here you are @psanford

code: 'Access-Request',
  identifier: 124,
  length: 182,
  authenticator: <Buffer 85 46 05 4a d6 47 fa d6 f8 88 31 60 6a 6d d4 1c>,
  attributes: .....
psanford commented 4 years ago

It looks like your microtik device isn't configured to use PAP authentication.

ghost commented 4 years ago

@psanford how can I do it? Capture

psanford commented 4 years ago

Sorry, I'm unfamiliar with the software you are using. Perhaps you should contact the developers of that software for support.

ghost commented 4 years ago

@psanford Seems you are the main contribute in this project! Who should I send this ticket to?

The image I sent is Mikrotik settings.

psanford commented 4 years ago

I'm sorry if I was unclear. I am not familiar with the Mikrotik software you are using so I'm not going to be able to help you configure that. Perhaps the maintainers of the Mikrotik software can assist you.

I don't think there is an issue here with the node-radius library. If you have pcap file that shows there is something misbehaving in this library we can investigate further.