friwall/web/templates/rules/edit.html

57 lines
1.5 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% block header %}
<style>
tbody > tr:nth-child(odd) {
background-color: #eeeeee;
}
td {
vertical-align: top;
}
</style>
{% endblock %}
{% block content %}
<p>
Urejate pravilo #{{ index }}. <a href="{{ url_for('rules.index') }}">Seznam pravil.</a>
<form id="request" method="POST">
<p>
<label for="name">Ime</label><br>
<input name="name" value="{{ rule.name }}" />
<p>
Uporabniki, ki lahko o(ne)mogočijo pravilo<br>
{% for manager in rule.managers %}
<input name="manager" type="text" style="width: 50%" value="{{ manager }}" /><br>
{% endfor %}
<input name="manager" type="text" style="width: 50%" value="" />
<p>
<label for="text">Pravila nftables</label>
<textarea id="text" name="text" style="width: 100%; height: 20em;" placeholder="iif @inside ip saddr @from ip daddr @to accept iif @inside ip6 saddr @from/6 ip6 daddr @to/6 accept">
{{- rule.text }}
</textarea>
<p><button id="submit" type="submit">Shrani</button>
</form>
<p>
V pravilih lahko uporabljamo spodnja območja IP, npr. <code>@pr5</code> in <code>@pr5/6</code> za območji IPv4 in IPv6 učilnice 5. Za notranja omrežja uporabimo vmesnik <code>@inside</code>, za zunanja pa vmesnik <code>@outside</code>. Primere z razlago najdemo v <a href="https://wiki.nftables.org">dokumentaciji nftables</a>.
<table style="width: 100%;">
2023-07-24 13:45:45 +00:00
<thead>
<th>Omrežje
<th>IP
<th>IPv6
<th>VPN
2023-07-24 13:45:45 +00:00
<tbody>
{% for name, data in ipsets.items() %}
2023-07-24 13:45:45 +00:00
<tr>
<td>{{ name }}
<td>{{ data.ip|join('<br>')|safe }}
<td>{{ data.ip6|join('<br>')|safe }}
<td>{{ data.vpn }}
2023-07-24 13:45:45 +00:00
{% endfor %}
</table>
{% endblock %}