2019-08-25 02:06:19 +00:00
|
|
|
- name: ipset restore v4
|
|
|
|
command: ipset restore -file {{ firewall_ipset_v4 }}
|
|
|
|
|
|
|
|
- name: ipset restore v6
|
|
|
|
command: ipset restore -file {{ firewall_ipset_v6 }}
|
|
|
|
|
|
|
|
- name: iptables-restore
|
|
|
|
command: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- iptables-restore --test {{ firewall_iptables_rules_v4 }}
|
|
|
|
- iptables-restore {{ firewall_iptables_rules_v4 }}
|
|
|
|
|
|
|
|
- name: ip6tables-restore
|
|
|
|
command: ip6tables-restore {{ firewall_iptables_rules_v6 }}
|
|
|
|
|
2022-08-30 12:22:53 +00:00
|
|
|
- name: reload ipset
|
|
|
|
shell: ipset restore -exist -file {{ firewall_ipset }}
|
|
|
|
|
2019-08-25 02:06:19 +00:00
|
|
|
- name: restart firewall v4
|
2022-08-30 12:22:53 +00:00
|
|
|
shell: "{{ item }}"
|
2019-08-25 02:06:19 +00:00
|
|
|
loop:
|
2022-08-30 12:22:53 +00:00
|
|
|
- iptables-restore --test {{ firewall_iptables_rules_v4 }} && iptables-restore {{ firewall_iptables_rules_v4 }}
|
2019-08-25 02:06:19 +00:00
|
|
|
|
|
|
|
- name: restart firewall v6
|
2022-08-30 12:22:53 +00:00
|
|
|
shell: "{{ item }}"
|
2019-08-25 02:06:19 +00:00
|
|
|
loop:
|
2022-08-30 12:22:53 +00:00
|
|
|
- ip6tables-restore --test {{ firewall_iptables_rules_v6 }} && ip6tables-restore {{ firewall_iptables_rules_v6 }}
|
2019-08-25 02:06:19 +00:00
|
|
|
|
|
|
|
- name: iptables-persistent
|
|
|
|
command: /usr/sbin/netfilter-persistent save
|
2019-09-02 17:50:56 +00:00
|
|
|
|
|
|
|
- name: restart ulogd
|
|
|
|
service:
|
|
|
|
name: "{{ firewall_ulogd_service_name }}"
|
|
|
|
state: restarted
|