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

Addin Peer in wg0.conf in false Line / Breaks Config #403

Open
gothren1986 opened this issue Nov 10, 2023 · 5 comments
Open

Addin Peer in wg0.conf in false Line / Breaks Config #403

gothren1986 opened this issue Nov 10, 2023 · 5 comments

Comments

@gothren1986
Copy link

gothren1986 commented Nov 10, 2023

Hello, I've got the problem when adding a new peer it's inserted in the false Line and breaks another clients configuration:

Her is a Code Example:

# test1 start
[Peer]
PublicKey = 
PresharedKey = 
AllowedIPs = 10.8.0.20/32,fd42:42:42::20/128
# test1 end
# test2 start
[Peer]
PublicKey = 
PresharedKey = 
#test-new start
[Peer]
PublicKey = 
PresharedKey = 
AllowedIPs = 10.8.0.15/32,fd42:42:42::15/128
# test-new end
AllowedIPs = 10.8.0.21/32,fd42:42:42::21/128
# test2 end
# test3 start
[Peer]
PublicKey = 
PresharedKey = 
AllowedIPs = 10.8.0.23/32,fd42:42:42::23/128
# test3 end

It worked very well for a long time, but I think I made a mistake in deleting old peers, how can I fix this without reconfiguring all peers?

@Prajwal-Koirala
Copy link
Member

Fixed check now.

@gothren1986
Copy link
Author

Issue still persists... Could Fix it temporary by changing the following Line 1507 in the Script:

    # Insert the new client information into the WireGuard configuration file
    #sed --in-place $((TEMP_WRITE_LINE * 6 + 11))i"${WIREGUARD_TEMPORARY_PEER_DATA}" ${WIREGUARD_CONFIG}
    echo "${WIREGUARD_TEMP_NEW_CLIENT_INFO}" >>${WIREGUARD_CONFIG}

@Prajwal-Koirala
Copy link
Member

@gothren1986
Please create a PR, on the latest public build everything seems normal.

@Gill-Bates
Copy link

Having the same issue! Creating an additional peer will break the config!

@Prajwal-Koirala
Copy link
Member

Having the same issue! Creating an additional peer will break the config!

Please join the discord server!

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

3 participants