wireguard at startup - Linux Mint Forums (2024)

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
wireguard at startup - Linux Mint Forums (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
wireguard at startup - Linux Mint Forums (3)
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
wireguard at startup - Linux Mint Forums (4)
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
wireguard at startup - Linux Mint Forums (7)
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:

wireguard at startup - Linux Mint Forums (8)
Screenshot from 2024-01-26 18-27-46.png (20.5 KiB) Viewed 1458 times

Top

sambuco
Level 1
wireguard at startup - Linux Mint Forums (9)
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
wireguard at startup - Linux Mint Forums (2024)

FAQs

How do I start WireGuard on startup? ›

Re: wireguard at startup

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.

Why not to use WireGuard? ›

WireGuard prioritizes speed, ease of use, and network security, but, some might say, at the expense of privacy. WireGuard does lack some standard features and practices many other protocols offer to enhance user privacy protection, such as: Dynamic IP addresses. Auto-deletion of user IP addresses upon disconnection.

Does Linux support WireGuard? ›

WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circ*mstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable.

How to connect to VPN with WireGuard Linux? ›

Option 2: use WireGuard (command-line interface)
  1. Install WireGuard. Ubuntu / Debian. ...
  2. Generate a configuration file. Visit our WireGuard configuration file generator. ...
  3. Connect with WireGuard. For this guide, we have selected Malmö, Sweden (se-mma-wg-001), as our server location. ...
  4. Verify your connection.
Apr 25, 2024

Is Tailscale better than WireGuard? ›

Connections between devices are done using WireGuard, but Tailscale manages more advanced aspects like users and device discovery. Using Tailscale's UI, users can set up advanced access controls for a whole organization, and shape their network accordingly.

How to tell if WireGuard is working? ›

To view the status of one or more WireGuard tunnels, use the show wireguard [<instance>] command. This command prints the status of all WireGuard tunnels and can optionally limit the output to a specific instance.

Is anything better than WireGuard? ›

Verdict on Security

There are no known security flaws in either protocol. If security is your topmost priority, the conservative option is OpenVPN. It has simply been around much longer than WireGuard, gone through more third-party security audits, and has a far longer track record than WireGuard.

Can WireGuard be hacked? ›

Protocols such as OpenVPN, WireGuard, or IKEv2 have no known vulnerabilities and are considered secure.

Which is safer WireGuard or OpenVPN? ›

While WireGuard is generally faster, OpenVPN provides heavier security.

What is the best port to run WireGuard on? ›

The port used by the peer for WireGuard traffic. The default port is 51820 if left empty. If the Endpoint is empty, this value is ignored. An interval, in seconds, at which an empty packet is sent to the peer to keep the session active.

What Linux kernel is required for WireGuard? ›

WireGuard requires Linux ≥3.10, with the following configuration options, which are likely already configured in your kernel, especially if you're installing via distribution packages.

Which Linux kernel has WireGuard? ›

WireGuard was merged into the Linux kernel for 5.6. This repository contains a backport of WireGuard for kernels 3.10 to 5.5, as an out of tree module.

How to enable WireGuard on Linux? ›

Autostart WireGuard in systemd
  1. Generate a valid and working WireGuard configuration file /etc/wireguard/wg0. ...
  2. Add the WireGuard service to systemd: ...
  3. Start the new service immediately: ...
  4. Reboot your computer system to verify the automatic connection on startup works as expected.
  5. Check the service status:

How to manually configure WireGuard on Linux? ›

Open NetworkManager → VPN → +.
  1. If the WireGuard option is not available, restart your computer and try again. If it is, select Import from file…
  2. Locate the . ...
  3. Configuration is now complete. ...
  4. You are now connected to ProtonVPN using the WireGuard protocol.

How much does WireGuard cost? ›

Since WireGuard and OpenVPN are free software, there is no expense associated with using them. Though there are some free solutions, you'll still need to pay for a VPN subscription. Since WireGuard and OpenVPN are free software, there is no expense associated with using them.

How do I start WireGuard on Windows? ›

Option 2: use the WireGuard app
  1. Download the WireGuard app. Download the official WireGuard app for Windows (available in 32- and 64-bit versions) from the WireGuard website and run the installation.
  2. Generate and import configuration file. ...
  3. Connect and disconnect. ...
  4. Using multiple devices? ...
  5. Is it working? ...
  6. Local network sharing.
Apr 25, 2024

How do I enable WireGuard VPN? ›

How to get started with WireGuard VPN
  1. Sign up with UpCloud. ...
  2. Deploy a new cloud server. ...
  3. Installing WireGuard. ...
  4. IP forwarding. ...
  5. Configuring firewall rules. ...
  6. Generating private and public keys. ...
  7. Generate server config. ...
  8. Starting WireGuard and enabling it at boot.

How do I run WireGuard VPN? ›

  1. Step 1: Expose Wireguard VPN Server to the Internet. Your Public IP Address. ...
  2. Step 2: Setup Wireguard VPN Server. Install the wireguard software and dependencies. ...
  3. Step 3: Setup client connections. ...
  4. Step 4: Setup clients. ...
  5. Step 5: Test Connection.
Sep 29, 2023

How do I set up WireGuard in Windows? ›

I have a key pair
  1. Go to Surfshark's login page and log in. Then, visit VPN > Manual setup. Choose the Desktop or mobile option and click on WireGuard.
  2. In the next window, click on I have a key pair.
  3. Name your key pair and click Next.
  4. Enter your public key and hit Save.
Feb 27, 2024

Top Articles
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 5598

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.