| 1 | {% extends "app.html" %} |
| 2 | {% comment %} |
| 3 | # SPDX-License-Identifier: AGPL-3.0-or-later |
| 4 | {% endcomment %} |
| 5 | |
| 6 | {% load i18n %} |
| 7 | {% load static %} |
| 8 | |
| 9 | {% block page_head %} |
| 10 | <link type="text/css" rel="stylesheet" |
| 11 | href="{% static 'firewall/firewall.css' %}"> |
| 12 | {% endblock %} |
| 13 | |
| 14 | {% block configuration %} |
| 15 | |
| 16 | <h3>{% trans "Status" %}</h3> |
| 17 | |
| 18 | <div class="table-responsive"> |
| 19 | <table class='table table-autowidth'> |
| 20 | <thead> |
| 21 | <th>{% trans "Service/Port" %}</th> |
| 22 | <th>{% trans "Status" %}</th> |
| 23 | </thead> |
| 24 | |
| 25 | <tbody> |
| 26 | {% for component in components|dictsort:"name" %} |
| 27 | {% if component.ports %} |
| 28 | <tr> |
| 29 | <td class="app-name"> |
| 30 | <a class="dropdown-toggle" href="#" |
| 31 | data-bs-toggle="collapse" role="button" |
| 32 | data-bs-target=".{{component.component_id}}" |
| 33 | aria-expanded="false" |
| 34 | aria-controls="{{component.component_id}}"> |
| 35 | {{ component.name }}</a> |
| 36 | </td> |
| 37 | <td class="app-status"> |
| 38 | {% if component.is_enabled %} |
| 39 | <span class='badge text-bg-success'> |
| 40 | {% trans "Enabled" %}</span> |
| 41 | {% else %} |
| 42 | <span class='badge text-bg-warning'> |
| 43 | {% trans "Disabled" %}</span> |
| 44 | {% endif %} |
| 45 | </td> |
| 46 | </tr> |
| 47 | {% for port in component.ports_details %} |
| 48 | <tr class="collapse {{component.component_id}}"> |
| 49 | <td class='service'> |
| 50 | <span class="service-name">{{ port.name }}</span>: |
| 51 | {% for port_number, protocol in port.details %} |
| 52 | {{ port_number }}/{{ protocol }} |
| 53 | {% endfor %} |
| 54 | </td> |
| 55 | <td class="service-status"> |
| 56 | {% if port.name in internal_enabled_ports and port.name in external_enabled_ports %} |
| 57 | <span class='badge text-bg-success'> |
| 58 | {% trans "Permitted" %}</span> |
| 59 | {% elif port.name in internal_enabled_ports %} |
| 60 | <span class='badge text-bg-warning'> |
| 61 | {% trans "Permitted (internal only)" %}</span> |
| 62 | {% elif port.name in external_enabled_ports %} |
| 63 | <span class='badge text-bg-warning'> |
| 64 | {% trans "Permitted (external only)" %}</span> |
| 65 | {% else %} |
| 66 | <span class='badge text-bg-danger'> |
| 67 | {% trans "Blocked" %}</span> |
| 68 | {% endif %} |
| 69 | </td> |
| 70 | </tr> |
| 71 | {% endfor %} |
| 72 | {% endif %} |
| 73 | {% endfor %} |
| 74 | </tbody> |
| 75 | </table> |
| 76 | </div> |
| 77 | |
| 78 | <p> |
| 79 | <em> |
| 80 | {% blocktrans trimmed %} |
| 81 | The operation of the firewall is automatic. When you enable |
| 82 | a service it is also permitted in the firewall and when you |
| 83 | disable a service it is also disabled in the firewall. |
| 84 | {% endblocktrans %} |
| 85 | </em> |
| 86 | </p> |
| 87 | |
| 88 | <h3>{%trans "Advanced" %} </h3> |
| 89 | <p> |
| 90 | {% blocktrans trimmed %} |
| 91 | Advanced firewall operations such as opening custom ports are provided |
| 92 | by the <a href="/_cockpit/network/firewall">Cockpit</a> app. |
| 93 | {% endblocktrans %} |
| 94 | </p> |
| 95 | |
| 96 | {% endblock %} |