SJBERTRAND / gnome-wireguard-extension

Wireguard extension for the gnome-shell
GNU General Public License v2.0
23 stars 1 forks source link

Cannot import configuration file #12

Open thelabcat opened 1 month ago

thelabcat commented 1 month ago

Am using Fedora Worstation 40. Cannot import Wireguard client configuration file. The file dialog opens, and lets me select it, but when I click Open the dialog closes and nothing more happens.

SJBERTRAND commented 1 month ago

That is odd. I use Fedora Workstation 40 as well and never had any problem loading a configuration file. The file format might be off. Ensure it looks like this

[Interface] Address = PrivateKey = DNS =

[Peer] PublicKey = AllowedIPs = Endpoint = PersistentKeepalive =

Obviously the values in the example are missing but the file structure should look like it. (The DNS is optional)

You can also try to load the file via the gnome-control-center

In the network tab

image

Click on the + sign beside VPN and choose import from file.

image

thelabcat commented 1 month ago

A command line solution worked once I had renamed the file to wg0.conf instead of Kevin_GlassTablePC.conf, so idk if this problem is very legitimate. I do think someone should have mentioned that necessity in the Pi-Hole documentation, but TYJ it's working now.

thelabcat commented 1 month ago

I did try that file import thing in GNOME Settings, but it said the file was not a valid Cisco compatible config (this was before the rename).

snoopen commented 6 days ago

Pretty sure I encountered a similar issue. After much frustration pulling my hair out I realised the filename was too long. No idea where the limitation is coming from. I think the max I discovered was 20 chars total including the .conf.

Not 100% sure this is the same issue but worth checking.

EDIT: I just Googled it and discovered

The name of the WireGuard interface used in the Linux kernel. Names must be unique, max 15 characters and only contain letters, numbers, hyphens or underscores.

https://resources.opengear.com/om/manuals/23.10.4/Content/Wireguard_Configuration.htm

Which lines up perfectly with what I was seeing.

"Kevin_GlassTablePC" is 18 characters so would be expected to fail.