
On 2021-03-19 3:39 p.m., Mathias Homann wrote:
What would be nice now is for the Ethernet connections to recognize location and switch zones.
Networkmanager is your friend - there's a folder /etc/NetworkManager/dispatcher.d which holds any number of scripts that get executed in alphabetical order every time a connection goes up or down.
One way to "recognize locations" would be to get the address of the default gateway from the routing table, then get the mac address for that ip address - MAC addresses are supposed to be unique.
My laptop recognizes my home network that way, and enable and disable a few odds and ends that I don't need at home, and enable and disable some odds and ends that I don't need elsewhere - not just firewall zones:
I'll have to look into that. tnx