wireguard at startup
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
- Print view
5 posts• Page 1 of 1
- sambuco
- Level 1
- Posts: 3
- Joined: Fri Jan 26, 2024 5:56 am
wireguard at startup
- Quote
Postby sambuco »
Hi everyone, I installed Linux Mint yesterday.
Everything is going pretty well, except for a few little problems that I'm slowly solving.
Now I have a problem with wireguard.
I followed the installation advice on the main site.
I added about ten different VPN configurations.
Everything works perfectly.
I only have one problem:
wireguard starts when the system starts and opens all the connections at once and therefore the internet doesn't work and I have to deactivate the connections one by one each time.
Is there a way to stop wireguard from starting automatically and me deciding when to activate it and with which connection?
Now when I turn it on, once all the connections have been deactivated, I can then activate the one I like without problems.
Top
Coggy
- Level 5
- Posts: 668
- Joined: Thu Mar 31, 2022 10:34 am
Re: wireguard at startup
- Quote
Postby Coggy »
There are two conflicting ways to configure wireguard. You don't say which you used - I'm guessing you used wg-quick. Anyway:
1: wg-quick and systemctl
This involved placing a configuration file (e.g. wg0.conf) in /etc/wireguard, then using systemctl enable wg-quick@wg0
to start it. Also systemctl start/stop/disable
to control it. Disabling it prevents it from starting at boot. But typing systemctl commands is a pain. Nobody tells you that there is a little panel applet (right-click the cinnamon task panel and choose applets) called WireGuard that you can install that gives you a small GUI applet for starting/stopping each vpn. Works well. I think that behind the scenes it uses systemctl enable/disable but I haven't checked.
2: Network manager
Recent Network Manager has the ability to configure wireguard interfaces. I haven't used this though it seems to be pretty-much complete.
Not many people have mentioned it, and I have a suspicion that it only shows an option to configure wireguard interfaces if it discovers that there already is one in existence. Network Manager recently started showing my wq-quick interfaces and offering a slider to stop-start them. But it doesn't work with systemctl controlled ones - it can stop them but doesn't fully remove them, so you can't restart them again either with network manager or with systemctl. If you use systemctl, don't touch the network manager controls for them.
It may be possible to fully configure a wireguard vpn purely from network manager, in which case don't use systemctl to control them - don't even create a configu file in /etc/wireguard. Network manager keeps its own configurations elsewhere. However, I don't think network manager even shows you the option to create a wireguard interface unless you already have one that wg-quick created. It's all a bit peculiar. Probably best not to mess with the half-finished network manager one.
Top
- sambuco
- Level 1
- Posts: 3
- Joined: Fri Jan 26, 2024 5:56 am
Re: wireguard at startup
- Quote
Postby sambuco »
The problem is, I don't know exactly what I did.
I did the first installation like this:
https://idroot.us/install-wireguard-linux-mint-20/
but then when he asked me to create the configuration file I didn't know what to do and I left.
Then I understood what I had to do.
I added the configurations like this:
nmcli connection import type wireguard file filename.conf
The problem is that every time I start the system it opens all the connections at once.
- Attachments
Top
Coggy
- Level 5
- Posts: 668
- Joined: Thu Mar 31, 2022 10:34 am
Re: wireguard at startup
- Quote
Postby Coggy »
Hmm. I don't know about wireguard. As I say, I found that it could disable them, but then they never started again without wg-quick down and up again.
Can I suggest that you try adding that wireguard applet to the tray? Screenshot of the applet attached:
- Screenshot from 2024-01-26 18-27-46.png (20.5 KiB) Viewed 1458 times
Top
- sambuco
- Level 1
- Posts: 3
- Joined: Fri Jan 26, 2024 5:56 am
Re: wireguard at startup
- Quote
Postby sambuco »
I solve the problem.
Under network setting I went to the specific wireguard connection.
In general tab there was the option automatic connection.
I deselect it and all worked correctly.
- Attachments
Top
Post Reply
- Print view
5 posts• Page 1 of 1
Return to “Networking”
Jump to
- Important Notices
- ↳ Main Edition Support
- ↳ Beginner Questions
- ↳ Hardware Support
- ↳ Storage
- ↳ Sound
- ↳ Networking
- ↳ Virtual Machines
- ↳ Cinnamon
- ↳ MATE
- ↳ Xfce
- ↳ Other topics
- ↳ Non-technical Questions
- ↳ Tutorials
- Debian Edition Support
- ↳ LMDE Forums
- ↳ Beginner Questions
- ↳ Hardware Support
- ↳ Networking
- ↳ Tutorials
- ↳ LMDE Archive
- Interests
- ↳ Gaming
- ↳ Cinnamon on Wayland
- Customization
- ↳ Screenshots
- ↳ Your Artwork
- Chat
- ↳ Introduce Yourself
- ↳ Chat about Linux Mint
- ↳ Chat about Linux
- ↳ Open Chat
- International
- ↳ Translations
- ↳ Deutsch - German
- ↳ Español - Spanish
- ↳ Français - French
- ↳ Italiano - Italian
- ↳ Nederlands - Dutch
- ↳ Português - Portuguese
- ↳ Русский - Russian
- ↳ Suomi - Finnish
- ↳ Other Languages
- ↳ Čeština-Slovenčina - Czech-Slovak
- ↳ Magyar - Hungarian
- ↳ 日本語 - Japanese
- ↳ Polski - Polish
- ↳ Svenska - Swedish
- ↳ Українська - Ukrainian