SJBERTRAND / gnome-wireguard-extension

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

Can't use sudo #5

Closed aconte31 closed 1 year ago

aconte31 commented 1 year ago

Hello,

I have a problem, when I launch the wireguard connection via the extension, it show it is active but it doesn't work. When I launch via the command: sudo wg-quick up /path/to/wg0.conf

The connection is up and working, what can be modified to integer this choice into the extension ?

Thank you for the extension. Best regards.

SJBERTRAND commented 1 year ago

The extension work with the network-manager api. Only connection that were added with network manager will work. Any connection that are added using sudo and wg-quick will be visible but the extension wont be able to interact with them as they require sudo privilege . The extension is done that way for security reason.

You can add your connection with the following command $ nmcli connection import type wireguard file Once its added you should be able to activate/deactivate it.

Tell me if it's works for you.

aconte31 commented 1 year ago

Hello,

I tried with the command given above, but it doesn't work neither. wouldn't that be a good feature to add ?

Regards.

SJBERTRAND commented 1 year ago

Hi Sorry for the late reply.

If I have time I might look into it. The latest Gnome 44 has everything build in the gnome shell now. You can add edit and remove Wireguard from the gnome control panel under network.

A new version of the extension was release recently and let you choose a .conf file for new connection instead of using the command line.

Keep in mind that the .conf file need to respect the Wireguard official template.

Should looks like this

[Interface] Address = 10.200.100.10/24 PrivateKey = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= DNS = 192.168.0.1

[Peer] PublicKey = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= AllowedIPs = 0.0.0.0/0 Endpoint = 8.8.8.8:51820 PersistentKeepalive = 30