Sebastian Lenzlinger 000cf610df Update.
2024-03-25 22:41:44 +01:00

1.4 KiB

TLDR: Command line utility of NetworkManager

Benefit: Automates setting up WiFi, DHCP server and NAT config, according to here.

Commands

nmcli dev #list network devices
nmcli con down <name> # disable AP config
nmcli con delete <name> # permanently delete AP configuration
sudo systemctl restart NetworkManager # for config changes to take effect
sudo nmcli device set <interface-name> managed no # make sure itnerface is not managed by NetworkManager. Can use d instead of device.

More examples here

Config

Ignoring specific devices

This is mostly taken from different parts of archwiki/NetworkManager. This is desirable so it wont interfere with our hostapd or dnsmasq config. In /etc/NetworkManager/conf.d/unmanaged.conf : MAC addr based:

[keyfile]
unmanaged-devices=mac:<hwaddr>

Interface name based:

[keyfile]
unmanaged-devices=interface-name:<ifname>

After modifying run

sudo nmcli general reload

Resources: https://wiki.archlinux.org/title/Software_access_point#NetworkManager_is_interfering and https://wiki.archlinux.org/title/NetworkManager#Ignore_specific_devices