Skip to content

Commit

Permalink
Merge branch 'master' of github.com:robertdebock/ansible-role-firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Aug 30, 2021
2 parents 8744b23 + 268b119 commit 587ab30
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 587ab30

Please sign in to comment.