Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

As Promised, the /etc/NetworkManager/system-connection Networking Templates For BookWorm

597 views
Skip to first unread message

56d.1152

unread,
Nov 6, 2023, 10:40:00 PM11/6/23
to
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.


mm0fmf

unread,
Nov 7, 2023, 12:22:11 AM11/7/23
to
On 07/11/2023 03:39, 56d.1152 wrote:
> 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.

nmcli is really quite straightforward once you play with. Or use the
'graphic' text mode tool nmtui.

Seems a much better idea to me to learn to use the tools rather than
muck about with files 'you have discovered' and could change on the next
update rendering your work moot.

Here's a link to nmcli, doesn't seem to be hideous to me.

<https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_nmcli>

56d.1152

unread,
Nov 7, 2023, 12:39:21 AM11/7/23
to
On 11/7/23 12:22 AM, mm0fmf wrote:
> On 07/11/2023 03:39, 56d.1152 wrote:
>> 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.
>
> nmcli is really quite straightforward once you play with. Or use the
> 'graphic' text mode tool nmtui.

No, I don't think it's "straightforward" at all. I'm
gonna write a new one that IS.

And basically we were talking "headless", non-GUI,
installs - ie the "lite" versions for Pi.

Anyway, do as you will. I'm just providing *a* way,
that's still in the nmcli universe, but maybe easier
to deal with. Someone else seems to have found a
way to still use /etc/network and wpa_supplicant -
albeit in a slightly odd way - that'll still work
on Bookworm. It's just evil to be reduced to kinda
un-inventing the wheel simply to Get Stuff Done.

> Seems a much better idea to me to learn to use the tools rather than
> muck about with files 'you have discovered' and could change on the next
> update rendering your work moot.

Nope. Screw 'em. Looking at FreeBSD-ARM again already ...
ain't gonna play the Canonical "Let's Change Everything
For No Reason" game anymore. Linux suddenly seems to
be self-destructing.

> Here's a link to nmcli, doesn't seem to be hideous to me.

It is. There are a lot of things you have to set, maybe
reset, for a eth0 or wifi interface. nmcli does NOT make
that process smooth of obvious.

Maybe to YOU ... but I've seen a number here who see
it my way.

> <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_nmcli>

56d.1152

unread,
Nov 9, 2023, 12:31:32 AM11/9/23
to
On 11/7/23 7:57 AM, Bob Latham wrote:
> In article <7tacnfvlDdgYLNT4...@earthlink.com>,
> 56d.1152 <56d....@ztq9.net> wrote:
>
> [Snip]
>
>> The templates ... first for wireless :
>
>> Now for wired - simpler :
>
> Thanks for that. Having a good look at that.

It works ... and making changes are really quick.
No mucking around with the more complex, ill-doxed,
aspects of 'nmcli'. Had to tweak two units just
today, like 30 seconds each using nano.

Beginning to work on a Python script to adjust
those NetworkManager templates - something "for
the rest of us" who almost always just have to
change a FEW things.




0 new messages