mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-12-16 07:20:36 +00:00
firewalld block icmp timestamp responses
This commit is contained in:
parent
e68b778711
commit
29e63763cd
7
roles/easyredmine/files/timestamp-reply.xml
Normal file
7
roles/easyredmine/files/timestamp-reply.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<icmptype>
|
||||
<short>Timestamp Reply</short>
|
||||
<description>This message is used to reply to a timestamp message.</description>
|
||||
<destination ipv4="yes"/>
|
||||
<destination ipv6="no"/>
|
||||
</icmptype>
|
7
roles/easyredmine/files/timestamp-request.xml
Normal file
7
roles/easyredmine/files/timestamp-request.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<icmptype>
|
||||
<short>Timestamp Request</short>
|
||||
<description>This message is used for time synchronization.</description>
|
||||
<destination ipv4="yes"/>
|
||||
<destination ipv6="no"/>
|
||||
</icmptype>
|
@ -35,6 +35,26 @@
|
||||
notify: restart firewalld
|
||||
when: is_production_vm == True
|
||||
|
||||
- name: define new icmp types for timestamp responses
|
||||
copy: dest='/etc/firewalld/icmptypes/{{ item }}.xml'
|
||||
src='{{ item }}.xml'
|
||||
sudo: yes
|
||||
with_items:
|
||||
- timestamp-reply
|
||||
- timestamp-request
|
||||
|
||||
- name: load new icmp types for timestamp responses
|
||||
command: firewall-cmd --reload
|
||||
sudo: yes
|
||||
|
||||
- name: disable icmp timestamp responses
|
||||
command: firewall-cmd --permanent --zone=public --add-icmp-block={{ item }}
|
||||
sudo: yes
|
||||
with_items:
|
||||
- timestamp-reply
|
||||
- timestamp-request
|
||||
notify: restart firewalld
|
||||
|
||||
- name: restart firewalld
|
||||
service: name=firewalld
|
||||
state=restarted
|
||||
|
Loading…
Reference in New Issue
Block a user