frontporch / radius.net Goto Github PK
View Code? Open in Web Editor NEWSimple to use RADIUS client
License: MIT License
Simple to use RADIUS client
License: MIT License
What would be solution for the use of MS-CHAP v2?
It looks like the project should be .NET Standard 2.0 compatible as-is.
Just update the project format and multi-target for net45
and netstandard20
.
Hi guys,
Maybe not the right site but for the love of God i can't seem to add an additional parameter to be sent to radius. I have done everything semantically and syntactically correct but the server send an error of malformed massage.
Any ideas or examples?
Can I authenticate VPN PPTP?
_Length field of RadiusPacket is always 18 lower than the RawData.Length after SetMessageAuthenticator is called.
Would you consider adding:
STATUS_SERVER = 12,
as one of the enumerated RADIUS codes
at line 16 of Radius.NET?
Code 12 is shown as "experimental"
in RFC 2865 and gets a full treatment
in RFC 5997.
Your RADIUS client is used by PRTG and a sensor
that made use of a Status-Server code
would make for a very light-weight sensor.
Thanks for building this. Is there a way to use this code to change the radius password? I work with a tool that sets an initial password, but then sets the account into a "user must change password at next use" mode. This translates into a "access-challenge" result. But some applications, such as Cisco Anyconnect VPN, can prompt the user to change the password when they receive this challenge.
Is there a way to do this with your code?
Thanks!
Steve
Hi.
when Auth but did not console write Accept
also, when Auth fail then write Reject hope.
Thanks
I have created new MVC Web Application and trying to integrate VIP Access Notification but I am not able to receive response from line "RadiusPacket receivedPacket = await rc.SendAndReceivePacket(authPacket);"
public ActionResult Index()
{
string[] args = new string[4];
args[0] = "MYIP";
args[1] = "KEY";
args[2] = "UserName";
args[3] = "Password";
try
{
Authenticate(args).Wait();
}
catch (Exception e)
{
//Console.WriteLine(e);
}
return View();
}
Below is my Authenticate function
private async static Task Authenticate(string[] args)
{
RadiusClient rc = new RadiusClient(args[0], args[1], 60000, 1822);
RadiusPacket authPacket = rc.Authenticate(args[2], args[3]);
authPacket.SetAttribute(new VendorSpecificAttribute(10135, 1, UTF8Encoding.UTF8.GetBytes("Testing")));
authPacket.SetAttribute(new VendorSpecificAttribute(10135, 2, new[] { (byte)7 }));
RadiusPacket receivedPacket = await rc.SendAndReceivePacket(authPacket);
if (receivedPacket == null) throw new Exception("Can't contact remote radius server !");
switch (receivedPacket.PacketType)
{
case RadiusCode.ACCESS_ACCEPT:
Console.WriteLine("Access-Accept");
foreach (var attr in receivedPacket.Attributes)
Console.WriteLine(attr.Type.ToString() + " = " + attr.Value);
break;
case RadiusCode.ACCESS_CHALLENGE:
Console.WriteLine("Enter Secret : ");
string secret = Console.ReadLine();
args[3] = args[3] + secret;
RadiusClient rc1 = new RadiusClient(args[0], args[1], 60000, 1822);
RadiusPacket authPacket1 = rc1.Authenticate(args[2], args[3]);
authPacket1.SetAttribute(new VendorSpecificAttribute(10135, 1, UTF8Encoding.UTF8.GetBytes("Testing")));
authPacket1.SetAttribute(new VendorSpecificAttribute(10135, 2, new[] { (byte)7 }));
RadiusPacket receivedPacket1 = await rc1.SendAndReceivePacket(authPacket1);
Console.WriteLine(receivedPacket1.PacketType);
break;
case RadiusCode.ACCESS_REJECT:
Console.WriteLine("Access-Reject");
if (!rc.VerifyAuthenticator(authPacket, receivedPacket))
Console.WriteLine("Authenticator check failed: Check your secret");
break;
default:
Console.WriteLine("Rejected");
break;
}
}
I am getting notification in my mobile device but after selecting any of the option (e.g. Approve Or Deny) I am not getting response of selected event.
NOTE: Same thing is working fine in my console application.
Let me know if I missed anything in code.
Does the code code supports the CHAP ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.