0

Hello I have a question regarding to wireguard.

What happens if multiple clients (Peers) use the same credentials?

Example setup:

  • I have a wireguard-server at home.
  • I initiate a connection to the server with my smartphone and a minute later with my laptop. Both share the same Private and Public Keys and Wireguard-IP's.

Possible outcome

  1. None of the clients will be able to access the server.
  2. The client that joins last takes over the connection and kicks out the client that joined prior.
  3. The server will be able to serve all clients simultaneous?
1

Peers are identified by their keys. You won't be able to add multiple duplicate peers to a server; trying to do so would just update the first peer's configuration.

The 'Endpoint' parameter is not used to match inbound packets – even if you configure it manually, that's only used when sending outbound packets. As soon as the server receives a packet that can be recognized as belonging to a specific peer key, it will automatically update that peer's endpoint address so that replies start going to the new address.

This means that if you have two client devices sending packets with the same keypair, the server will either continuously bounce between the two, or will not work at all, but you will not be able to use both clients simultaneously.

  • So 1. or 2., thank you. – AlexOnLinux Dec 2 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.