nftables: Fix opening ports without ip range
This commit is contained in:
parent
82e029593e
commit
4373c84301
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ table ip filter {
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
ip {{ rule.proto }} dport {{ rule.port }} accept
|
||||
{{ rule.proto }} dport {{ rule.port }} accept
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
reject with icmp type host-prohibited
|
||||
|
@ -42,11 +42,11 @@ table ip6 filter {
|
|||
{% set from = lookup('dig', from) %}
|
||||
{% endif %}
|
||||
{% if from | ipv6 %}
|
||||
ip saddr {{ from }} {{ rule.proto }} dport {{ rule.port }} accept
|
||||
ip6 saddr {{ from }} {{ rule.proto }} dport {{ rule.port }} accept
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
ip {{ rule.proto }} dport {{ rule.port }} accept
|
||||
{{ rule.proto }} dport {{ rule.port }} accept
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
reject with icmpv6 type admin-prohibited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue