- Установка WireGuard
- Ubuntu и Debian
- ОС Bunsenlabs (Debian):
- Linux Mint 19 и новее
- Подключение WireGuard
- Установка WireGuard на другие версии Linux
- Linux Mint Forums
- [SOLVED] Wireguard GUI configuration
- Re: Wireguard GUI configuration
- Re: Wireguard GUI configuration
- Re: Wireguard GUI configuration
- Re: Wireguard GUI configuration
- Re: Wireguard GUI configuration
- How To Install Wireguard on Linux Mint 20
- Install Wireguard on Linux Mint 20 Ulyana
Установка WireGuard
В операционных системах семейства Linux установка WireGuard проводится через командную строку («Терминал», «Консоль»). Команды различаются в зависимости от версии Linux.
Ubuntu и Debian
sudo apt update
sudo apt install wireguard
Пользователям Debian Bullseye и старше следует enable backports.
ОС Bunsenlabs (Debian):
1. Скачайте файл конфигурации .OVPN в ножной вам локации через наш Telegram-бот https://t.me/FCK_RKN_bot:
— Установить VPN
— Нужная локация
— OpenVPN
2. Установите OVPN на ваше устройство командой
‘sudo apt-get install openvpn network-manager-openvpn-gnome’
3. Затем выполните команду
‘sudo service network-manager restart’
4. Выполните скаченный ранее файл конфигцрации .OVPN командой
sudo openvpn [file name]
5. Запустите OVPN утилиту командой ‘sudo nm-connection-editor’ и нажмите Добавить/Add.
Или нажмите на иконку настройки сети в таскбаре и далее «Выбрать VPN соединение» -> «Конфигурировать VPN».
6. Здесь вам понадобится выбрать сохраненный файл конфигурации и заполнить поля логин/пароль, который вам выдал бот вместе с файлом конфигурации.
Чтобы активировать, нажмите на иконку менеджера сетей, выберите VPN соединения и запустите VPN.
Linux Mint 19 и новее
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt-get update
sudo apt-get install wireguard
Подключение WireGuard
Запросите конфигурационный файл .conf для WireGuard в нашем боте BlancVPN. Для этого введите команду /start, и последовательно нажмите кнопки «Установить VPN» → нужная локация → «WireGuard».
Сохраните конфигурационный файл .conf по пути /etc/wireguard/wg0-client.conf или скопируйте его содержимое и сохраните по пути /etc/wireguard/wg0-client.conf .
Готово, вы подключены к VPN.
После подключения проверьте, изменился ли ваш IP-адрес. Для этого откройте наш сайт blancvpn.com и посмотрите на панель вверху страницы: там будет указан ваш новый IP-адрес и локация.
Если возникли сложности или что-то пошло не так – напишите нам в Telegram-бот https://t.me/FCK_RKN_bot, поможем!
Установка WireGuard на другие версии Linux
Linux Mint Forums
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] Wireguard GUI configuration
Post by stefan_o » Thu Jan 19, 2023 9:05 am
Hi,
I have no problem using wireguard on the terminal to start/stop a client connection, but I recently installed Linux Mint for someone else (the kind of person that 95% of the time is just using the browser and would just assume it’s another Windows version). But now there is the need for using Wireguard. On Windows Wireguard comes with a nice symbol in the tray to enable/disable it and see weather it’s active, and I know you can start/stop OpenVPN or OpenConnect VPN connections as simple as that using network-manager on Mint. But there seems to be no support for wireguard. Is there a simple solution to start/stop wireguard using network-manager or another GUI application with a tray icon?
Re: Wireguard GUI configuration
Post by KodiakCanoe » Thu Jan 19, 2023 3:59 pm
Are you using Linux Mint 21.1 Cinnamon? I’m on 20.3 so can’t check the Network Manager version on 21.1
/usr/sbin/NetworkManager --version
Later versions of Network Manager can handle wireguard connections, however they may not show the status in the panel:
https://www.xmodulo.com/wireguard-vpn-n . r-gui.html
«For example, as of NetworkManager 1.26.2, when WireGuard VPN is up, the network indicator does not show the status icon for WireGuard.»
Network Manager may be a good choice to use for connect/disconnect, and to show the status you could use the «bash sensors» Cinnamon applet as a workaround: https://cinnamon-spices.linuxmint.com/applets/view/231
If you’re good with bash then it might be possible to also change the connection state (using nmcli) when the applet is clicked
To display status the command could be something like this, with unicode Green Checkmark = Connected, Red X = Disconnected (icons can also be used):
if nmcli -g GENERAL.STATE c s interfacename | grep -q 'activ'; then echo -e "\u2705"; else echo -e "\u274c"; fi
Not an expert and I haven’t tried that myself, but I do something similar with the bash-sensors applet to show the up/down status of my NordVPN connection.
Re: Wireguard GUI configuration
Post by stefan_o » Thu Jan 19, 2023 5:30 pm
I’m on Mint 21.1 with NetworkManager version 1.36.6.
Ok, first I was a bit stupid: WireGuard is not listed as VPN connection, but as «virtual» connection, so it as actually supported, but not as VPN.
I was able to import wireguard settings, the wireguard connection shows up in the GUI where I can edit the settings. But not in the list of VPN connections to activate/deactivate. It’s not listed at and I couldn’t find a way to start/stop the connection using the GUI.
Additionally, for security the key is stored on an encrypted partition. It is set using PostUp in the wireguard conf. That doesn’t seem to work with NetworkManager, I also couldn’t find a way to manually set a keyfile instead of entering the password directly.
For me bash is horror, in my opinion even PHP is consistent and well-designed compared to bash scripts. No matter how simple the task is, I’d rather use Python instead (in fact, before starting Python, I used PHP for scripts).
Re: Wireguard GUI configuration
Post by KodiakCanoe » Thu Jan 19, 2023 6:02 pm
Unfortunately I’m unable to test it, my network manager version is only 1.22.10 with no wireguard support. I don’t know what the problem could be with the keys.
There may be an easier solution out there, but the bash-sensors applet can run a command when the applet is clicked, so if you called a Python script I think that should also work.
Maybe just something simple using nmcli: check the status, if VPN is enabled then disable, if disabled then enable. (I don’t know Python) Bash-sensors can refresh the status icon on a timer using the command I gave above, so that will update on it’s own.
I think it’s worth a shot anyway. I would check if clicking the applet can launch a Python script and then you’re most of the way there! Good Luck!
Re: Wireguard GUI configuration
Post by Coggy » Fri Jan 20, 2023 4:52 am
In my laptop and desktop (both running Mint) I see an icon in the «system tray» next to the network, sound, bluetooth etc, icons. It’s monochrome (like all the others of course) with something that looks like a figure 8, maybe supposed to be a coiled snake. Clicking this, I see a slide switch for each Wireguard VPN where I can turn them on and off.
I have vague memories of having to sudo chmod 755 /etc/wireguard to allow users to at least see the names of the wireguard VPN configuration files before the widget could show them though.
I can post more info when I get in front of a Mint ‘puter this evening.
EDIT: Here is a screenshot of the widget:
Re: Wireguard GUI configuration
Post by Andre8900 » Sun Jan 22, 2023 4:58 pm
I would like to have this feature as well. I want to connect to Wireguard VPNs as easy as I could connect to OpenVPN networks in the NetworkManager. I wasn’t able to import my WG config graphically (got an error) and (after importing it via terminal) the connection is listed under its own category («WireGuard»), but not under «VPN» and it can’t be toggled in the GUI. This should not be hard to implement at all as it’s just an easy command to execute:
nmcli connection up 'My VPN'
Coggy wrote: ⤴ Fri Jan 20, 2023 4:52 am In my laptop and desktop (both running Mint) I see an icon in the «system tray» next to the network, sound, bluetooth etc, icons.
How To Install Wireguard on Linux Mint 20
In this tutorial, we will show you how to install Wireguard on Linux Mint 20. For those of you who didn’t know, WireGuard is a fast and modern VPN that utilizes state-of-the-art cryptography. It’s much faster than OpenVPN or IPsec while also having a smaller codebase that is easier to audit and maintain.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘ sudo ‘ to the commands to get root privileges. I will show you through the step-by-step installation of Wireguard VPN on a Linux Mint 20 (Ulyana).
Prerequisites
- A server running one of the following operating systems: Linux Mint 20 (Ulyana).
- It’s recommended that you use a fresh OS install to prevent any potential issues
- A non-root sudo user or access to the root user . We recommend acting as a non-root sudo user , however, as you can harm your system if you’re not careful when acting as the root.
Install Wireguard on Linux Mint 20 Ulyana
Step 1. Before running the tutorial below, it’s important to make sure your system is up to date by running the following apt commands in the terminal:
Step 2. Installing Wireguard on Linux Mint 20.
The installation of WireGuard is actually quite simple. Open a terminal window and issue the command:
sudo apt install wireguard
Run the following commands to install Snap packages:
sudo rm /etc/apt/preferences.d/nosnap.pref sudo apt update sudo apt install snapd
To install WireGuard, simply use the following command:
sudo snap install wireguard-ammp
Step 3. Configure WireGuard.
WireGuard works by encrypting the connection using a pair of cryptographic keys. The keypair is used by sharing the public key with the other party who then can encrypt their message in such a way that it can only be decrypted with the corresponding private key. So, the first thing to be done is to generate the necessary private and public key pair. To do this, go back to the terminal window and issue the following commands:
mkdir ~/.wireguard cd ~/.wireguard umask 077 wg genkey | tee privatekey | wg pubkey > publickey
Next, you need to copy the contents of the newly-generated private key with the command:
Then, generate server config:
sudo nano /etc/wireguard/wg0.conf
Add the following directives to the configuration file:
[Interface] PrivateKey = Address = 10.0.0.1/24 PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE ListenPort = 51820 [Peer] PublicKey = AllowedIPs = 10.0.0.2/32
Next, start WireGuard and enable it at boot:
sudo wg-quick up wg0 sudo systemctl enable wg-quick@wg0
Step 4. Configure Firewall.
For Debian servers, you can install the ufw , Uncomplicated Firewall, using the command below:
Next, add the following rules to allow SSH and WireGuard connections:
sudo ufw allow ssh sudo ufw allow 51820/udp
Congratulations! You have successfully installed Wireguard. Thanks for using this tutorial for installing the latest version of Wireguard VPN on the Linux Mint system. For additional help or useful information, we recommend you to check the official Wireguard website.
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!