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

Connecting to a new peer #25

Open
Delave-las-Kure opened this issue Dec 24, 2022 · 1 comment
Open

Connecting to a new peer #25

Delave-las-Kure opened this issue Dec 24, 2022 · 1 comment

Comments

@Delave-las-Kure
Copy link

Delave-las-Kure commented Dec 24, 2022

Hi. I'm having some trouble connecting to the new peer. After creating a new peer, I can't connect to it until I restart the docker container or use the route add command. Can you help?
An example of my config:

[Interface]
Address = 10.13.13.1/32
SaveConfig = true
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth+ -j MASQUERADE
ListenPort = 51820
PrivateKey = 

[Peer]
PublicKey = 
PresharedKey = 
AllowedIPs = 10.13.13.2/32
@suquant
Copy link
Owner

suquant commented Nov 9, 2023

Hey @Delave-las-Kure

From the example config you provided, everything seems to be set up correctly. However, to provide a more precise answer, it would be great to have a bit more context about your setup, especially regarding how you're integrating WGRest within your Docker environment.

Based on what you've described, this sounds like it might be an issue related to Docker's network configuration rather than a problem with WGRest or WireGuard itself. When you create a new peer, it's possible that the necessary network routes are not being automatically updated within the Docker container, hence the need to either restart the container or manually add the route.

A few things to check or try:

  1. Ensure that the Docker container's network mode is correctly configured to handle the WireGuard VPN traffic.
  2. Check if there are any specific firewall rules or network policies within Docker that might be blocking the new connections.
  3. Review Docker's logs to see if there are any errors or warnings when you add a new peer.

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