ufw cannot be used for ICMP, so we use iptables
This commit is contained in:
@@ -16,6 +16,16 @@
|
|||||||
proto: tcp
|
proto: tcp
|
||||||
src: 'any'
|
src: 'any'
|
||||||
|
|
||||||
|
- name: system setup | firewall | allow ping (ICMP) from internal network via iptables rule
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/ufw/user.rules
|
||||||
|
marker: "### {mark} ANSIBLE MANAGED BLOCK (ICMP for internal network)"
|
||||||
|
insertbefore: "^COMMIT"
|
||||||
|
block: |
|
||||||
|
# Allow incoming ICMP (ping) requests from internal network
|
||||||
|
-A ufw-user-input -p icmp --icmp-type echo-request -s 192.168.1.0/24 -j ACCEPT
|
||||||
|
notify: reload ufw firewall
|
||||||
|
|
||||||
- name: system setup | firewall | allow other monitoring traffic from internal networks
|
- name: system setup | firewall | allow other monitoring traffic from internal networks
|
||||||
community.general.ufw:
|
community.general.ufw:
|
||||||
rule: allow
|
rule: allow
|
||||||
|
|||||||
Reference in New Issue
Block a user