Firewall

class plinth.modules.firewall.components.Firewall(component_id, name=None, ports=None, is_external=False)[source]

Component to open/close firewall ports for an app.

__init__(component_id, name=None, ports=None, is_external=False)[source]

Initialize the firewall component.

diagnose()[source]

Check if the firewall ports are open and only as expected.

See plinth.app.Component.diagnose().

disable()[source]

Close firewall ports when the component is disabled.

enable()[source]

Open firewall ports when the component is enabled.

static get_internal_interfaces()[source]

Returns a list of interfaces in a firewall zone.

Filter out tun interfaces as they are always assumed to be internal interfaces.

classmethod list()[source]

Return a list of all firewall ports.

property ports_details

Retrieve details of ports associated with this component..