Skip to content

Commit

Permalink
Merge pull request #9 from ashpooljh/master
Browse files Browse the repository at this point in the history
Fix some errors in the iptables template
  • Loading branch information
robertdebock authored Aug 25, 2021
2 parents c46c769 + 5b594b2 commit 268b119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/iptables.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
-A INPUT -i lo -j ACCEPT

{% for service in firewall_services %}
{% if service.state != "absent" %}
{% if (service.state | default("present")) != "absent" %}
-A INPUT -m state --state NEW {% if service.protocol is defined %}{% if service.protocol == "tcp" %}-m tcp{% endif %}{% endif %} -p {{ service.protocol | default ('tcp') }} --dport {{ service.name }} -j ACCEPT
{% endfor %}
{% endif %}
{% endfor %}

-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
Expand Down

0 comments on commit 268b119

Please sign in to comment.