As Promised, the /etc/NetworkManager/system-connection Networking Templ
From
56d.1152@21:1/5 to
All on Mon Nov 6 22:39:45 2023
BookWorm changed a lot of things - and NOT always
for the best. Particularly vexing for PI users who
create headless, non-GUI, applications is that all
the old ways of setting up static IPs and such for
ethernet and wireless are no longer viable, and
there's only the hideously-documented 'nmcli' for
doing things. Yea, it CAN work - but it's so awful
that it should commit suicide immediately for
the good of human-kind.
However, as a result of using GUI tools (the Gnome
network manager GUI app) I've found where and how
NetworkManager stores the final config files. So,
I'm just gonna post a wired and wireless template
here in plain text.
First off though, sudo (ok, I remove sudo in all
my outward-linked boxes as a security risk)
"nmcli add con MyEtherCon" ... or whatever name
you want for the connection. Do the same for
a wireless, but maybe as "MyWiFiCon". This
creates stupid useless templates, but you can
copy/paste my examples into them and go from there.
They GO into "/etc/NetworkManager/system-connections",
so go there and remove anything you didn't create.
The templates ... first for wireless :
- - - - - - -
[connection]
id=MyWiFiCon
uuid=d25782f3-1c68-49a4-be77-2279f607016d
type=wifi
interface-name=wlan0
timestamp=1698437737
[wifi]
mode=infrastructure
ssid=MySSDName
[wifi-security]
key-mgmt=wpa-psk
psk=MyWiFiPassword
[ipv4]
address1=192.168.x.xxx/24,192.168.x.1
dns=8.8.8.8;
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=disabled
[proxy]
- - - - - -
Now for wired - simpler :
- - - - - -
[connection]
id=MyEtherCon
uuid=5f4e9641-9c2e-344c-9a1f-4079402c9b57
type=ethernet
autoconnect-priority=-999
interface-name=eth0
timestamp=1698437731
[ethernet]
[ipv4]
address1=192.168.x.xxx/24,192.168.x.1
dns=8.8.8.8;
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=disabled
[proxy]
- - - - - -
I'd suggest keeping the "id=" the same as the name
you used with nmcli ... can't vouch for anything else.
Reboot
These WORK on a BookWorm Pi4 - just fill in the
names and local addresses you want and you'll
get nice stable static IPs.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)