summaryrefslogtreecommitdiff
path: root/templates/firewall/send-redirects/node.def
blob: 9a36554f436e5e5f5a26e6017a2df8946400f01f (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
type: txt

help: Set policy for sending IPv4 ICMP redirect messages

comp_help:Possible completions:
  enable\tEnable sending IPv4 ICMP redirect messages
  disable\tDisable sending IPv4 ICMP redirect messages

default: "disable"

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

create:
	if [ x$VAR(@) == xenable ]; then
	    sudo sh -c "echo 1 > /proc/sys/net/ipv4/conf/all/send_redirects"
        else
	    sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects"
	fi

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

delete:
	sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects"