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 · 6 comments
Open

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

gothren1986 opened this issue Nov 10, 2023 · 6 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?

@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}

@Gill-Bates
Copy link

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

@jawm111
Copy link

jawm111 commented Jul 28, 2024

Hello, Issue still persists, is it possible to resolve it?

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

4 participants
@Gill-Bates @jawm111 @gothren1986 and others