• As Promised, the /etc/NetworkManager/system-connection Networking Templ

    From 56d.1152@3:770/3 to All on Monday, November 06, 2023 22:39:45
    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: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mm0fmf@3:770/3 to All on Tuesday, November 07, 2023 05:22:07
    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>

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 56d.1152@3:770/3 to All on Tuesday, November 07, 2023 00:38:45
    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>

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Latham@3:770/3 to 56d.1152@ztq9.net on Tuesday, November 07, 2023 12:57:32
    In article <7tacnfvlDdgYLNT4nZ2dnZfqnPadnZ2d@earthlink.com>,
    56d.1152 <56d.1152@ztq9.net> wrote:

    [Snip]

    The templates ... first for wireless :

    Now for wired - simpler :

    Thanks for that. Having a good look at that.

    Bob.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 56d.1152@3:770/3 to Bob Latham on Thursday, November 09, 2023 00:31:20
    On 11/7/23 7:57 AM, Bob Latham wrote:
    In article <7tacnfvlDdgYLNT4nZ2dnZfqnPadnZ2d@earthlink.com>,
    56d.1152 <56d.1152@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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)