Skip to content

[New App] Firewall module/application #3259

@labre-rdc

Description

@labre-rdc

Introduction

Hi, we like and use the profile based IPv4 network address setup, however we are working in a context with multiple factory sites with isolated networks having static addresses without a default route. So the main issue we are having is that the NetworkCategory is Public due to the “Unidentified Network” in these environments and while we can set it to Private using powershell, we often have to reconnect ethernet cables, which resets the network category and firewall.

Some ports need to be open though due the network containing being production components (robots, SPS etc.), so it would be nice, if we could configure these per site instead of the broader NetworkCategory approach.

To be contributed

Since I am currently finishing my education as IT application specialist (German: Fachinformatiker für Anwendungsentwicklung), I have chosen with my superior to develop this (Sub-)Application/Extension as my project thesis/work. I can develop for around 50 to 60 hours and must be finished until 2025-12-15.

The idea is outlined in the following:

NetworkCategory

Store the NetworkCategory within the profile and set it, when the profile is applied. This will not be reliable, because the category is reset on reconnect. For that reason the interface state needs to be observed and the category must be reapplied, if a interface connect event happens. This could be done by putting NETworkManager in alert state or opening the window showing a prompt to reapply the category, such that the UAC request is not prompted out of nowhere (causing reasonable distrust in users). Similarly to group policies this wil have 3 states:

  • Not configured (Do not change)
  • Private
  • Public

If the active state is DomainAuthenticated the setting will be inactive and a category change won’t be attempted. This may still fail due to a local security policy.

Show an error in that case and also indicate domain networks.

Firewall rules

Store profile specific firewall rules within the profile. This would avoid the Category reset problem with its reoccurring UAC prompts and could be applied for Public networks within a specific customer profile, which then would only be set active on the factory site.

The naming of these rules should have the following scheme and users must not be able to control it for security reasons:

Nwm_<profile name>_<protocol (tcp/udp) or program as prog>_<direction (in or out)>_<program name or port/port range>

For example:

Nwm_Test Profile_tcp_in_443

Issues to handle

Handling these cases might be out of the scope of this project, if I run out of time, however I might add handling for them later in my free time.

  • The rules could be altered outside the scope of NETworkManager and we need to recognize this. If this is detected, the user needs to be prompted with the rules, that were found to either discard them and load from profile or accept them updating the profile.
  • Rules could be added in the system following the naming system. This might be malicious (but on the other hand, it requires elevation, so users have other concerns in that case). A use case might be, that a backup of old profiles has been restored, but the system still contains another set of rules. In that case, users need to confirm addition or deletion of rules from the system.
  • As a goodie we could allow importing the ruleset from the system firewall rule set, if rules with this naming scheme are detected, but no firewall rules are configured due to e.g., the loss of profile files. This is a rare use case though, so I will most likely omit it.

And that’s basically the project idea.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions