Skip to content

Instantly share code, notes, and snippets.

@111a5ab1
Created January 17, 2018 10:04
Show Gist options
  • Save 111a5ab1/58f28de56304c5124a5d9f0953d34280 to your computer and use it in GitHub Desktop.
Save 111a5ab1/58f28de56304c5124a5d9f0953d34280 to your computer and use it in GitHub Desktop.
To view what an EdgeOS option does, such as "firewall all-ping enable", cat the coresponding node.def file.
root@ubnt:~# cd /opt/vyatta/share/vyatta-cfg/templates/firewall/all-ping
root@ubnt:/opt/vyatta/share/vyatta-cfg/templates/firewall/all-ping# cat node.def
# 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
val_help: disable; Disable processing of all IPv4 ICMP echo requests
val_help: enable; Enable 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment