k4yt3x / wg-meshconf

WireGuard full mesh configuration generator.
GNU General Public License v3.0
952 stars 105 forks source link

Why is Endpoint mandatory? #29

Closed 42Network closed 2 years ago

42Network commented 2 years ago

I don't understand why Endpoint is mandatory in the CSV? It is not mandatory when adding via command line.

Also, Wireguard itself doesn't need the endpoint to work correctly. At least I've never needed it, in my limited experience.

dimon222 commented 2 years ago

Also, Wireguard itself doesn't need the endpoint to work correctly.

What do you mean? How is your machine planning to reach another machine without knowing its IP address/hostname?

ss-o commented 2 years ago

It seems that Endpoint was misunderstood. Here is an example where it is required on a client machine.

[Interface]
PrivateKey = some key
Address = some addr
DNS = some addr

[Peer]
PublicKey = some key
PresharedKey = some prekey
Endpoint = ip:port              <- Endpoint to connect (server)
AllowedIPs = ips
42Network commented 2 years ago

My simple use case has always been just a single "server" which is my OPNsense home router, and a bunch of dynamic clients, such as phone, laptop, tablet, and a few linux boxes that are behind campus firewalls but have persistence enabled. And I was mistaken in saying Endpoint isn't used in my case - each client does refer to the endpoint of my single server.

I guess I now realize that I've misunderstood the purpose of wg-meshconf. In my case I don't actually have or need a mesh, since I only I have a single server. I was hoping I could use wg-meshconf and its handy database to simply manage the key pairs for my server and clients as a replacement for the notepad file I use currently.

Thanks

mwt commented 1 year ago

@42Network I think you want this https://github.com/Nyr/wireguard-install