Create ICMP Firewall rule

This commit is contained in:
L3D 2022-12-28 17:43:49 +01:00
parent fe35b6d512
commit 92d485bea5
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 30 additions and 0 deletions

5
defaults/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
# set ICMP Profiles on private and public networks on default
win_firewall_icmp_profiles:
- private
- public

22
tasks/firewall.yml Normal file
View file

@ -0,0 +1,22 @@
---
- name: Firewall rule to alloc ICMP v4 on all type codes
community.windows.win_firewall_rule:
name: ICMP Allow incoming V4 echo request
enabled: yes
state: present
profiles: "{{ win_firewall_icmp_profiles }}"
action: allow
direction: in
protocol: icmpv4
icmp_type_code: '*'
- name: Firewall rule to alloc ICMP v6 on all type codes
community.windows.win_firewall_rule:
name: ICMP Allow incoming V6 echo request
enabled: yes
state: present
profiles: "{{ win_firewall_icmp_profiles }}"
action: allow
direction: in
protocol: icmpv6
icmp_type_code: '*'

3
tasks/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
- name: Cofigure ICMP on Windows Firewall
ansible.builtin.include_tasks: firewall.yml