Can anyone guide me or point me to an article that explains how to setup automatic firewall rules based on network connection? I need different firewall rules depending on if I am connected to home, work or public networks. For example, I'd have different firewall rules if I am connected to my home's wifi versus when my laptop is connected to, let's say public wifi. I came across quite a few articles on internet on how to setup firewall rules, but they all seem to be assuming that one always connects to the same network.

Is there an easy way to build multiple firewall profiles and have one of them selected automatically based on network connection, maybe by network-manager?

Thanks

3 months later

KaOS already includes a basic firewall. I was mainly looking for a simpler solution to what I think should be a fairly common problem of setting appropriate firewall rules based on the network you connect to. Most firewalls on Windows, for example, have this down to set-and-forget level of ease. Each time you connect to a new network, they ask if this is home, work or public network and then onward firewall automatically detects network and sets up correct rules. It's nice to be able to finely tune settings but I bet most end-users are going to be using one of the above 3 use cases.

Not sure how close Fedora's firewalld comes to automating setup and ease of use, but it does support "zones".

Anyway, thanks for replying...