54 lines
1.6 KiB
Markdown
54 lines
1.6 KiB
Markdown
#tldr : Command line utility of [NetworkManager](https://networkmanager.dev)
|
|
Resources:
|
|
- https://wiki.archlinux.org/title/Software_access_point#NetworkManager_is_interfering
|
|
- https://wiki.archlinux.org/title/NetworkManager#Ignore_specific_devices
|
|
Benefit: Automates setting up WiFi, DHCP server and NAT config, according to [here](https://variwiki.com/index.php?title=Wifi_NetworkManager#Configuring_WiFi_Access_Point_with_NetworkManager).
|
|
|
|
|
|
# Commands
|
|
```bash
|
|
nmcli dev #list network devices
|
|
```
|
|
```bash
|
|
nmcli con down <name> # disable AP config
|
|
```
|
|
```bash
|
|
nmcli con delete <name> # permanently delete AP configuration
|
|
```
|
|
```bash
|
|
sudo systemctl restart NetworkManager # for config changes to take effect
|
|
```
|
|
```bash
|
|
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](https://networkmanager.dev/docs/api/latest/nmcli-examples.html)
|
|
|
|
# Config
|
|
## Ignoring specific devices
|
|
This is mostly taken from different parts of [archwiki/NetworkManager](https://wiki.archlinux.org/title/NetworkManager). This is desirable so it wont interfere with our [[hostapd]] or [[dnsmasq]] config.
|
|
In ``/etc/NetworkManager/conf.d/unmanaged.conf`` :
|
|
MAC addr based:
|
|
```config
|
|
[keyfile]
|
|
unmanaged-devices=mac:<hwaddr>
|
|
```
|
|
Interface name based:
|
|
```config
|
|
[keyfile]
|
|
unmanaged-devices=interface-name:<ifname>
|
|
```
|
|
After modifying run
|
|
```bash
|
|
sudo nmcli general reload
|
|
```
|
|
|
|
Must avoid having conflicting [[dnsmasq]] instances between #systemd managed and #NetworkManager built in.
|
|
|
|
|
|
# Troubleshooting
|
|
## Wifi adapter not found anymor
|
|
See [[Tools]].
|
|
|
|
|
|
|