2023-05-29 10:24:21 +00:00
{% extends 'base.html' %}
2024-04-30 13:13:50 +00:00
{% block header %}
< style >
tbody > tr:nth-child(odd) {
background-color: #eeeeee;
}
td {
vertical-align: top;
}
< / style >
{% endblock %}
2023-05-29 10:24:21 +00:00
{% block content %}
< p >
2024-04-30 13:13:50 +00:00
Urejate pravilo #{{ index }}. < a href = "{{ url_for('rules.index') }}" > Seznam pravil.< / a >
2023-05-29 10:24:21 +00:00
< 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 >
2024-04-30 13:13:50 +00:00
< 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 >
2023-05-29 10:24:21 +00:00
< p > < button id = "submit" type = "submit" > Shrani< / button >
< / form >
2024-04-30 13:13:50 +00:00
< 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 >
2024-04-30 13:13:50 +00:00
< th > Omrežje
< th > IP
< th > IPv6
< th > VPN
2023-07-24 13:45:45 +00:00
< tbody >
2024-04-30 13:13:50 +00:00
{% for name, data in ipsets.items() %}
2023-07-24 13:45:45 +00:00
< tr >
2024-04-30 13:13:50 +00:00
< 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 >
2023-05-29 10:24:21 +00:00
{% endblock %}