-
Notifications
You must be signed in to change notification settings - Fork 107
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
Bug: PersistentKeepalive
is added to the wrong side.
#30
Comments
Long story short, follow this:
You'll need this at all because the nodes that have a public IP can always be reached without an existing NAT connection, where as nodes behind NAT cannot be reached actively without maintaining a NAT connection on the firewall or whatever that's forwarding the connection. Therefore, you use |
With that said, your understanding seems to be correct. I'll take a look at the code, it might be a bug. |
Thanks for the feedback :) I have done some tests … It seems like So it would be nice if we could turn this around in the config generator. |
Looking into the code, it seems that the problem here is that PersistentKeepAlive is listed as a "peer attribute", which in the So I think we need to distinguish between two types of [Peer] attributes:
|
PersistentKeepalive
be specified?PersistentKeepalive
is added to the wrong side.
Hey @rudolfbyker thanks for the PR. Just give me a bit of time to verify that everything works fine and the change makes sense. |
#30 PersistentKeepAlive should be specified in the config file of the host which is behind NAT.
Here is a sample
database.csv
file:This generates the following config:
alpha:
beta:
gamma:
I have read all I could find about
PersistentKeepalive
(which is not a lot), and it sounds to me like it should only be specified in the config of the node which is behind NAT, which isgamma
in this case. But in the above example, it's specified everywhere except ingamma
's config.Is the bug in wg-meshconf, or in my understanding of
PersistentKeepalive
?My use case is to have a VPN of VMs, some of which are behind NAT, without public IPs, but most of which have public IPs. The servers without the public IPs should route traffic through one of the servers which DO have public IPs to reach other servers with don't have public IPs.
And yes, I'm trying to replace
tinc
:)The text was updated successfully, but these errors were encountered: