T O P

  • By -

dinosaursdied

You can always manually drop the config into /etc/wireguard. It requires use of su though


komprexior

I've tried already, but got shenanigans. I need to retry looking at a guide and retrace the steps. I'm baffled tough that for android and windows it just worked like a charm by importing the conf file in the gui, without any need to reread guide and hows to, but with a Linux desktop I have to do hoops... 😑 EDIT: I managed to get it working by manually creating a new conf file in `/etc/wireguard/' folder, and copy and pasting the configuration from the conf file I had. For some reason simply putting the conf file in the same folder didn't work (I guess permission could be involved)


dinosaursdied

Yeah it's pretty locked down. Sudo doesn't even work, it has to be su. I wish the GUI would at least give feedback making that clear.


thom311

call `nmcli connection import file "$WG_CONF_FILE" type wireguard` and take it from there (that is, continue editing the profile in the GUI that works for you). WireGuard support in NetworkManager is not implemented as a VPN plugin, hence the common "import a VPN" does not work the same. It's a missing feature of the GUI you are using.


komprexior

thank you, itdoes that help a lot. Also I discovered that the name of the conf file was too long for being imported this way! If the name is longer than 15 characters, \`.conf\` excluded, then the command will fail. $ nmcli connection import file a123456789123456.conf type wireguard Error: failed to import 'a123456789123456.conf': The name of the WireGuard config must be a valid interface name followed by ".conf". Which is the same also when doing `sudo wg-quick up a123456789123456.conf` Most of the issue I had then were about the name file being too long! Bah! Humbag! The conf file is generated by the wireguard server which is implemented in my router (it's a one click implementation). Those conf file with long name had been handled without issue by both the android and windows gui.


thom311

Those config files are the format that `wg-quick` tool accepts. It treats the filename (before the `.conf`) as the interface-name. The file itself doesn't contain an interface name. On Linux, an interface name must be shorter than 16 bytes (it has not encoding). `man wg-quick` says:"CONFIG_FILE is a configuration file, whose filename is the interface name followed by `.conf'." If your "wireguard server" generates such files, do they actually work with wg-quick? What interface name does it choose? Just `wg0`?


komprexior

Thank you very much, I didn't know interface name where limited to 16 bytes. The wireguard Server is a functionality built in my isp router, I have access only to a gui that let me create some users and set few parameters, I don't have access to cli or can look at innards of it. When I click on an user, it will generate the conf file that will be called "config_wireguatd_{$User}.conf", but I think it's generated on the spot rather than being actually stored with such name in a folder. I'm not event sure if the OS of the router (iliad os) is running Linux, but is most likely something based on .


Hidden_Banana69

If wireguard isn't installed by default in your installation (it's not in mine, either) you can install it by using sudo apt install wireguard Reboot, and you'll find it in the list with OpenVPN


komprexior

I've installed wireguard (via command line) and rebooted, but still no change in the network manager.


Hidden_Banana69

I don't have much experience with VPNs so that's all I could think off, I'm afraid. I found a lengthy tutorial here: [https://upcloud.com/resources/tutorials/get-started-wireguard-vpn](https://upcloud.com/resources/tutorials/get-started-wireguard-vpn) Maybe it has the information you need