123456789101112131415161718 |
- #!/bin/sh
- # Check for root user
- CURR_USER=`/usr/bin/whoami`
- if [ "$CURR_USER" != "root" ]; then
- echo "I need root rights... Please login from root"
- exit
- fi
- # Disable ping reply Permanently
- # You can permanently disable the ping reply using the following method.
- # Step 1: Edit the sysctl.conf file and add the following line.
- # net.ipv4.icmp_echo_ignore_all = 1
- # Step 2: Execute sysctl -p to enforce this setting immediately.
- # sysctl -p
- # The above command loads the sysctl settings from the sysctl.conf file.
- echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
|