ping-enable 568 B

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