|
|
@ -47,7 +47,7 @@ |
|
|
|
iptables_raw: |
|
|
|
iptables_raw: |
|
|
|
name: sshd_ports |
|
|
|
name: sshd_ports |
|
|
|
state: "{{ (sshd_src_ip is defined and sshd_src_ip | length > 0) | ternary('present','absent') }}" |
|
|
|
state: "{{ (sshd_src_ip is defined and sshd_src_ip | length > 0) | ternary('present','absent') }}" |
|
|
|
rules: "-A INPUT -m state --state new -p tcp -m multiport --dports {{ sshd_ports | join(',') }} -s {{ sshd_src_ip | join(',') }} -j ACCEPT" |
|
|
|
rules: "-A INPUT -m state --state new -p tcp -m multiport --dports {{ sshd_ports | join(',') }} -s {{ sshd_src_ip | flatten | join(',') }} -j ACCEPT" |
|
|
|
when: iptables_manage | default(True) |
|
|
|
when: iptables_manage | default(True) |
|
|
|
tags: ssh,firewall |
|
|
|
tags: ssh,firewall |
|
|
|
|
|
|
|
|
|
|
|