NetworkManager: Difference between revisions
m (→wpa_supplicant backend: Fix wikilinks, grammar.) |
m (Add todo item for autoconnect of wifi network on boot) |
||
Line 61: | Line 61: | ||
{{Todo|([[KDE|KDE Plasma]] Desktop) find out if it is possible to prevent requesting the password for '''KDE Wallet''' on login}} | {{Todo|([[KDE|KDE Plasma]] Desktop) find out if it is possible to prevent requesting the password for '''KDE Wallet''' on login}} | ||
{{Todo|([[KDE|KDE Plasma]] Desktop) for autoconnect to wifi network on start, it appears that the "all users may connect to this network" option must be selected in settings, as root is not a choice to allow. There are likely better workarounds}} | |||
* Follow: [[Wi-Fi#wpa supplicant]] and [[Wi-Fi#Automatic Configuration on System Boot]] | * Follow: [[Wi-Fi#wpa supplicant]] and [[Wi-Fi#Automatic Configuration on System Boot]] |
Revision as of 19:58, 25 August 2024
NetworkManager is a program that provides automatic detection and configuration for systems to connect to networks.
Installation
# apk add networkmanager
Networkmanager needs to have udev to be setup properly. The busybox implementation mdev is not sufficient. You can set up proper udev with:
# setup-devd udev
Otherwise your network devices can be listed as (strictly-)unmanaged.
There are multiple interfaces available for NetworkManager:
- TUI: networkmanager-tui, a curses-based interface (run
nmtui
) - Command line: networkmanager-cli (run
nmcli
) - GUI: plasma-nm for Plasma integration and applet
- GUI: network-manager-applet for a GTK system tray applet
You will need to install an additional package if you want NetworkManager to connect to wifi:
# apk add networkmanager-wifi
After installation start NetworkManager:
# rc-service networkmanager start
Then set it to autostart the service on boot:
# rc-update add networkmanager default
Also your user needs to be in the plugdev
group:
# adduser <YourUsername> plugdev
Wired networks
If wired networks do not appear or you get an error message like "Could not activate connection: Connection 'Ethernet connection 1' is not available on device eth0 because device is strictly unmanaged", add the following to /etc/NetworkManager/NetworkManager.conf:
[ifupdown] managed=true
Wireless networks
wpa_supplicant backend
Now open /etc/NetworkManager/NetworkManager.conf in a text editor and change it to something like this:
Contents of /etc/NetworkManager/NetworkManager.conf
Now you need to stop conflicting services:
# rc-service networking stop
# rc-service wpa_supplicant stop
Now restart NetworkManager:
# rc-service networkmanager restart
Now connect to a network using one of the interfaces mentioned in Installation
If that connects and stays connected with no issues enable the networkmanager
service and disable the networking
and wpa_supplicant
boot services:
# rc-update add networkmanager
# rc-update del networking boot
# rc-update del wpa_supplicant boot
iwd backend
NetworkManager supports wireless networks through iwd, however, consider existing issues before using it. After installation, enable the server and restart NetworkManager:
rc-service iwd start rc-service networkmanager restart
To use iwd though, you've have to edit NetworkManager's configuration because it still defaults to wpa_supplicant instead. Add the following to /etc/NetworkManager/NetworkManager.conf:
[device] wifi.backend=iwd
VPN support
Since version 1.16, NetworkManager has support for Wireguard[1].
Support for other VPN types is provided by plugins. They are provided in the following packages:
- networkmanager-openvpn for OpenVPN
nm-applet
not authorized to control networking
You can enable all users to edit connections without adding polkit.
First, make the conf.d
directory for networkmanager:
# mkdir -p /etc/NetworkManager/conf.d
Then, add following content to /etc/NetworkManager/conf.d/any-user.conf:
[main] auth-polkit=false
Finally, restart networkmanager:
# rc-service networkmanager restart