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

[v2] Keypairs/PublicKey can not be changed #265

Open
muellpanda opened this issue May 8, 2024 · 3 comments
Open

[v2] Keypairs/PublicKey can not be changed #265

muellpanda opened this issue May 8, 2024 · 3 comments
Labels
v2 wg-portal version 2

Comments

@muellpanda
Copy link
Contributor

When changing keys of a client, the Peer is not updated correctly and is unreachable.

Example:

  • I add a new Peer
  • I exchange the generated Keys, e.g. generated keys on my local machine with wg genkey
  • The PublicKey is updated correctly, but Peer is not, it holds the value of the old PublicKey (the one generated by wg-portal):
    [Interface]
    # -WGP- Peer: FoAbkzg2cC0Gr8V9ftrxQGF1EkzUy0H6mrNsVs8Jiik=
    # -WGP- Created: 2024-05-06 14:05:32.996740905 +0000 UTC
    # -WGP- Updated: 2024-05-08 14:30:48.350186128 +0000 UTC
    # -WGP- Display name: Müllpanda
    # -WGP- PublicKey: OwItXT+oKp4Netq1sFoq/yxMn07fKcC2DDDgA2mPtRc=
    # -WGP- Peer type: client
    
  • wg show also shows the old PublicKey, so the Peer is not reachable at all with the exchanged keypair
@h44z
Copy link
Owner

h44z commented Jul 4, 2024

have you tried to disable and re-enable the peer?

@h44z h44z added the v2 wg-portal version 2 label Jul 4, 2024
@muellpanda
Copy link
Contributor Author

I have tried to disable the peer, but it just keeps connected. It is removed correctly from the config, but wireguard itself does not get notified of the change. The peer is still listed with wg show. Restarting wg-portal (docker container) has no effect.
I guess #273 is highly related.

@ALIP-0
Copy link

ALIP-0 commented Jul 20, 2024

I have tested this and confirm the issue.
Also editing the sqlite.db to make the peer identifier match doesnt seem to allow it to work either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 wg-portal version 2
Projects
None yet
Development

No branches or pull requests

3 participants