简体   繁体   English

SoftEther 身份验证“拒绝访问”

[英]SoftEther Authentication "Access denied"

I'm using SoftEther APIs to connect to a VPS and then try to build a VPN on that .我正在使用SoftEther API连接到 VPS,然后尝试在其上构建 VPN。 I can successfully connect to server using IP and Port, then at Authentication step I get "Access denied" and no more details.我可以使用 IP 和端口成功连接到服务器,然后在身份验证步骤我得到“拒绝访问”,没有更多详细信息。 The authentication step is using Password and HubName.身份验证步骤使用密码和 HubName。

I've read the APIs codes deeply and I realized it using SHA0 algorithm to encrypt password and take a random arrays of bytes from server and use that as salt in encrypt method .我已经深入阅读了 API 代码,我意识到它使用SHA0算法加密密码并从服务器获取随机字节数组并将其用作 encrypt 方法中的盐。 So I've changed the encryption method at SoftEther Application to AES128 , AES256 and some others but the result has not been changed at all.所以我已经将 SoftEther Application 的加密方法更改为AES128AES256和其他一些,但结果根本没有改变。 I also tried to send password as an ASCII but none of them worked.我也尝试将密码作为ASCII发送,但都没有奏效。

The exact API code without change:没有更改的确切 API 代码:

using (var softEther = new SoftEther(ip, port))
{    
    // the connection step that would pass successfully :           
    var connectResult = softEther.Connect();
    if (!connectResult.Valid())
    {                    
        Console.WriteLine(connectResult.Error);
        return;
    }         

// the Authentication step that got problem :            
    var authResult = softEther.Authenticate(pw, hubName);
    if (!authResult.Valid())
    {
        Console.WriteLine(authResult.Error);
        return;
    }

    // the code stops and don't get here :           
    var user = softEther.HubApi.GetUser(hubName, userName);
    Console.WriteLine(user.Valid() ? "Success" : 
    user.Error.ToString()); 
}

And this is the authResult I get这是我得到的authResult

Well since you are working on server side of SoftEther i would recommend you to use VPNCMD for managing or retrieving info from SoftEther server.好吧,既然您在 SoftEther 的服务器端工作,我建议您使用 VPNCMD 来管理或检索来自 SoftEther 服务器的信息。

VPNCMD Virtual Hub commands: https://www.softether.org/4-docs/1-manual/6._Command_Line_Management_Utility_Manual/6.4_VPN_Server_%2F%2F_VPN_Bridge_Management_Command_Reference_(For_Virtual_Hub) VPNCMD 虚拟集线器命令: https ://www.softether.org/4-docs/1-manual/6._Command_Line_Management_Utility_Manual/6.4_VPN_Server_%2F%2F_VPN_Bridge_Management_Command_Reference_(For_Virtual_Hub )

For example enter the following in cmd/terminal:例如在 cmd/terminal 中输入以下内容:

vpncmd /server {serverIP} /PASSWORD:{server password} /adminhub:{server HUB Name} /CMD UserCreate {username} /GROUP:{groupname} /REALNAME:{user fullname} /NOTE:{anything} vpncmd /server {serverIP} /PASSWORD:{server password} /adminhub:{server HUB Name} /CMD UserCreate {username} /GROUP:{groupname} /REALNAME:{user fullname} /NOTE:{anything}

Requirements: Download and install SoftEther server manager for your machine OS(ie from where you want to control remote server)要求:为您的机器操作系统下载并安装 SoftEther 服务器管理器(即从您想要控制远程服务器的位置)

You can also execute VPN Client functions from VPNCMD: https://www.softether.org/4-docs/1-manual/6._Command_Line_Management_Utility_Manual/6.5_VPN_Client_Management_Command_Reference您还可以从 VPNCMD 执行 VPN 客户端功能: https ://www.softether.org/4-docs/1-manual/6._Command_Line_Management_Utility_Manual/6.5_VPN_Client_Management_Command_Reference

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF和SSL相互身份验证403-禁止:访问被拒绝 - WCF and SSL Mutual Authentication 403 - Forbidden: Access is denied 在同一台服务器上具有Windows身份验证的IIS反向代理获得访问被拒绝 - IIS reverse proxy with windows authentication on same server getting access denied 对Web服务使用Windows身份验证模式时,访问被拒绝错误 - Access Denied Error When using Windows Authentication Mode for WebServices 来自web api的Google身份验证:access_denied错误 - Google authentication from web api: access_denied error RIA域服务中的身份验证问题(拒绝访问操作) - authentication issues in RIA Domain Service (Access to operation denied) 使用Windows身份验证拒绝[授权(角色=“管理员”)]的访问权限 - Access denied for [Authorize(Roles = “Administrators”)] using Windows Authentication RestSharp OAuth2 承载身份验证失败,访问被拒绝 - RestSharp OAuth2 Bearer Authentication Failing With Access Denied IIS FTP 8自定义身份验证授权规则拒绝访问 - IIS FTP 8 Custom Authentication Authorization rules denied the access .Net Core 3.1 使用身份验证反应应用程序 - 403 错误使用提供的凭据拒绝访问 - .Net Core 3.1 react application with identity authentication - 403 Error Access is denied using provided credentials 需要代理身份验证(Forefront TMG需要授权才能完成请求。拒绝访问Web代理筛选器。) - Proxy Authentication Required (Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM