Setting method
-
echo value > /proc/sys/x/y
-
Use vim editor to edit the /etc/sysctl.conf file, then use sysctl -p command to take effect this file
-
sysctl -w parameters to be configured = value (this value is 0 and 0 represent mostly not open; 1 represents ON)
Command examples:
# Print all kernel parameters sysctl -a # ICMP protocol may be closed by the request command, the host is to avoid ping sweep sysctl -w net.ipv4.icmp_echo_ignore_all = 1
Use sysctl command to modify kernel parameters are initialized at power remount / proc, so we can modify /etc/sysctl.conf for persistence.