Firewall portion of plug should use FirewallD instead of ufw

Bug #1639775 reported by Neal Gompa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Switchboard Security & Privacy Plug
In Progress
Undecided
Corentin Noël

Bug Description

This plug currently requires ufw and executes ufw commands through pkexec to apply rules.

However, a better approach would be to use FirewallD[1] and communicate with it via D-Bus. This also has the advantage of making it less brittle as communication via D-Bus is easier to manage than pkexec calls and allows for more granular privilege control (reducing the need to escalate privileges to merely when you need to write new rules).

FirewallD also supports a service-oriented model for managing firewall rules. For example, if you're controlling via the CLI, to close the SSH port, you can just do "firewall-cmd --remove-service=ssh" instead of having to specify to remove port 22. This enables you to make the plug simpler and describe things in terms of services, rather than in terms of ports.

You can, of course, still specify ports and stuff. Via the CLI, it's merely "firewall-cmd --(add|remove)-port=<num>/(tcp|udp)".

It also has a concept of zones, so you can expose that if you'd like as well.

Everything about FirewallD is available via D-Bus, and all the tools currently written use D-Bus to communicate with it.

FirewallD is available as "firewalld" in Ubuntu.

[1]: http://www.firewalld.org/

Related branches

Neal Gompa (ngompa13)
description: updated
Zisu Andrei (matzipan)
Changed in switchboard-plug-security-privacy:
status: New → Confirmed
Corentin Noël (tintou)
Changed in switchboard-plug-security-privacy:
assignee: nobody → Corentin Noël (tintou)
status: Confirmed → In Progress
Neal Gompa (ngompa13)
tags: added: cross-distro
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.