add input and output iptables rules

This commit is contained in:
Robert Kaussow 2017-12-17 14:34:47 +01:00
parent 753bcbf89a
commit a39aa6dfd5
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
mosquitto_user: mosquitto
mosquitto_group: mosquitto
mosquitto_port: 8883
mosquitto_port: 61000
mosquitto_bind_address: "{{ ansible_default_ipv4.address }}"
mosquitto_pid_dir: /var/run
mosquitto_base_dir: /etc/mosquitto

View File

@ -55,7 +55,9 @@
iptables_raw:
name: allow_mttq_port
state: present
rules: '-A OUTPUT -m state --state NEW -p tcp --dport {{ mosquitto_port }} -j ACCEPT'
rules:
- '-A INPUT -m state --state NEW -p tcp --dport {{ mosquitto_port }} -j ACCEPT'
- '-A OUTPUT -m state --state NEW -p tcp --dport {{ mosquitto_port }} -j ACCEPT'
- name: Copy systemd unit files
template: