add iptables allowed ports
This commit is contained in:
parent
1892ef6800
commit
f93ac8cdce
|
@ -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" }
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue