
Firewall management

Ability to manage opened and closed TCP/UDP ports over IPv4/v6 on YNH firewall
We can automate this feat using ynh cli (see man yunohost for more info)
Docs:
YUNOHOST FIREWALL
usage: yunohost firewall {list,allow,disallow,upnp,reload,stop} ...
description:
Manage firewall rules
yunohost firewall list [-r|--raw] [-i|--by-ip-version] [-f|--list-forwarded]
List all firewall rules
-r, --raw
Return the complete YAML dict
-i, --by-ip-version
List rules by IP version
-f, --list-forwarded
List forwarded ports with UPnP
yunohost firewall allow protocol port [-4|--ipv4-only] [-6|--ipv6-only] [--no-upnp] [--no-reload]
Allow connections on a port
protocol
Protocol type to allow (TCP/UDP/Both)
port Port or range of ports to open
-4, --ipv4-only
Only add a rule for IPv4 connections
-6, --ipv6-only
Only add a rule for IPv6 connections
--no-upnp
Do not add forwarding of this port with UPnP
--no-reload
Do not reload firewall rules
yunohost firewall disallow protocol port [-4|--ipv4-only] [-6|--ipv6-only] [--upnp-only] [--no-reload]
Disallow connections on a port
protocol
Protocol type to allow (TCP/UDP/Both)
port Port or range of ports to close
-4, --ipv4-only
Only remove the rule for IPv4 connections
-6, --ipv6-only
Only remove the rule for IPv6 connections
--upnp-only
Only remove forwarding of this port with UPnP
--no-reload
Do not reload firewall rules
yunohost firewall upnp action [--no-refresh]
Manage port forwarding using UPnP
action
--no-refresh
Do not refresh port forwarding
yunohost firewall reload [--skip-upnp]
Reload all firewall rules
--skip-upnp
Do not refresh port forwarding using UPnP
yunohost firewall stop
Stop iptables and ip6tables