summaryrefslogtreecommitdiff
path: root/templates/firewall/all-ping/node.def
blob: 3b7de60007fba6e676b8de3ed70c1623ef1d30ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# icmp_echo_ignore_all 
# default value - 0
# If set non-zero, then kernel will ignore all ICMP ECHO requests sent to it

type: txt

help: Policy for handling of all IPv4 ICMP echo requests

comp_help:Possible completions:
  disable\tDisable processing of all IPv4 ICMP echo requests
  enable\tEnable processing of all IPv4 ICMP echo requests

default: "enable"

syntax:expression: $VAR(@) in "enable", "disable"; "all-ping must be enable or disable"

update:
	if [ x$VAR(@) == xdisable ]; then
	    sudo sh -c "echo 1 > \
	    	 /proc/sys/net/ipv4/icmp_echo_ignore_all"
        else
	    sudo sh -c "echo 0 > \
	    	 /proc/sys/net/ipv4/icmp_echo_ignore_all"
	fi

delete:
	sudo sh -c "echo 0 > \
	     /proc/sys/net/ipv4/icmp_echo_ignore_all"