add iptables allowed ports

This commit is contained in:
Robert Kaussow 2018-07-11 22:40:37 +02:00
parent 1892ef6800
commit f93ac8cdce
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ unifi_lvm_enabled: False
unifi_base_dir: /opt/unifi
unifi_tmp_dir: "{{ unifi_base_dir }}/tmp"
unifi_iptables_enabled: True
unifi_open_ports:
- { flag: "allow_unifi_web", proto: "tcp", port: "8443" }
- { flag: "allow_unifi", proto: "tcp", port: "8080" }
@ -24,4 +25,3 @@ unifi_open_ports:
- { flag: "allow_unifi", proto: "tcp", port: "8843" }
- { flag: "allow_unifi_stun", proto: "udp", port: "3478" }
- { flag: "allow_unifi_discover", proto: "udp", port: "10001" }

View File

@ -49,6 +49,7 @@
state: present
rules: "-A INPUT -m state --state NEW -p {{ item.proto }} --dport {{ item.port }} -j ACCEPT"
with_items: {{ unifi_open_ports }}
when: unifi_iptables_enabled
- name: Create systemd unit files
template: