Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue/Question] Setting up wireguard | Authenticating | Domains don't work #14

Closed
DesertCookie opened this issue May 14, 2021 · 7 comments

Comments

@DesertCookie
Copy link

I've been attempting to establish a connection but am unable to find the Wireguard file I'm supposed to add. Where can I find that?


Furthermore, I've been trying to authenticate without success (maybe because there's no Wireguard connection?). I'm successfully connecting to the server via WAN but get a Server Authentication Error: INAVLID REQUEST on the client, and Invalid request message (could be UNAME or SPASS) on the server. The log outputs the following:

... {'name': 'Server', 'Pk': PublicKey('PUBLIC_KEY_REMOVED'), 'ip': IPv4Address('9.0.0.1')} did not decrypt message from ('IP_REMOVED', 61044)
... {'name': 'Tobias', 'Pk': '', 'ip': '9.0.0.3'} did not decrypt message from ('IP_REMOVED', 61044)

I have two users: Tobias, and Ruben. I attempted to connect with both, the log always says Tobias.


Lastly, because my public IP changes daily, I tried to input my domain - which I already successfully use for the Resolve Project Server. It does not support domains. Please add support for domains as this would be the preferred way to connect for many users.


  • Server in Windows 10 VM with ports 4444 and 51820 forwarded
  • Clients are Windows 10, one in same LAN, one in the WAN
@jonnyhyman
Copy link
Owner

jonnyhyman commented May 14, 2021

I've been attempting to establish a connection but am unable to find the Wireguard file I'm supposed to add. Where can I find that?

  • The Wireguard client configuration file is created only after a successful authentication to the server. Since you haven't been able to connect yet, the app hasn't given you the chance to save one yet. The idea of authentication is to keep the client and server configurations automatically in sync
  • The Wireguard server configuration file is automatically managed in the background

Invalid request message (could be UNAME or SPASS)

This means that the user connecting is not providing a valid username (the one they're providing is not in the userlist) or server password.

I attempted to connect with both, the log always says Tobias

I have a theory to what's going on here... Basically, I think Ruben might not have entered the right server password.

  • When Ruben's authentication request comes in, it starts iterating through the userlist trying to find a match.
  • It gets to Server, Tobias, neither of which properly decrypt the incoming message (usernames are used to encrypt/decrpyt inbound messages)
  • Then it hits Ruben, where it successfully decrypts the message but the server password Ruben entered is incorrect.

Regrettably, I forgot to add a log message for "Server password invalid". I'm working on adding it right now.

Please add support for domains as this would be the preferred way to connect for many users.

Thanks for this! I wasn't sure domain support would be helpful in the past. Now it seems obvious!


I'm working on a pull request to solve the domain issue as well as the server password invalid issue, should be up in a couple minutes.

@jonnyhyman
Copy link
Owner

Also, planning to make a video tutorial today or tomorrow which hopefully will help sort out some of the confusion

@jonnyhyman
Copy link
Owner

I just pushed a new release version 0.1.1 beta

  • Server IP as ipv4, ipv6, or domain name

The server code has also been updated to print to the log when the server password is invalid.

Please give it a try and let me know what works and what doesn't!

@DesertCookie
Copy link
Author

DesertCookie commented May 17, 2021

Thank you for the swift reply.

Establishing a connection via domain works - even when using a LAN-DNS, which is great. It looks like the password truly was wrong (maybe some of the special characters didn't work as I set up the server via TeamViewer).

One more issue: I have little experience with Wireguard. Is there a way to configure it to work like ZeroTierOne, only making traffic to IPs within the configured subnet go through it? Currently, when having Wireguard turned on I have no working internet connection as everything tries to go through the VPN.

@jonnyhyman
Copy link
Owner

Great to hear the solution works! Thanks for testing!

For Tunnel-subnet-only, go into the Wireguard client configuration and change the line that says:
AllowedIPs = 0.0.0.0/0, ::/0

to something like
AllowedIPs = 9.0.0.0/24

Replacing the subnet there with whatever you've made yours. I might make this a server setting, so that the server admin can choose whether clients route all traffic or just subnet traffic.

@jonnyhyman
Copy link
Owner

I'm going to close the issue since it fixed the problem but feel free to keep commenting and let me know the subnet only change works :)

@DesertCookie
Copy link
Author

I might make this a server setting, [...]

It would make sense to have this be the default as I'm sure many people still want their normal internet to work as per usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants