Distinguish between ipv4 and ipv6.
This commit is contained in:
parent
4fd88f61f4
commit
e36d15bbbe
2 changed files with 7 additions and 1 deletions
|
@ -20,6 +20,12 @@
|
|||
# allow ssh - always
|
||||
-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 22 -j ACCEPT
|
||||
|
||||
{% if inventory_hostname in groups['proxies'] %}
|
||||
{% for friend in friends6 %}
|
||||
-A INPUT --src {{ friend }} -j DROP
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
# if the host/group defines incoming tcp_ports - allow them
|
||||
{% if tcp_ports is defined %}
|
||||
{% for port in tcp_ports %}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
-A INPUT -p tcp -m tcp --dport 5666 -s 10.5.126.41 -j ACCEPT
|
||||
|
||||
{% if inventory_hostname in groups['proxies'] %}
|
||||
{% for friend in friends %}
|
||||
{% for friend in friends4 %}
|
||||
-A INPUT --src {{ friend }} -j DROP
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue