Dos Attack Detection & Disable ping response

DoS Attack Detection In Linux
You can simply use netstat command to print out a list of all open connection to your Linux box. The list will be sorted out using sort command including total number of connections from a specific IP address.

Login as the root user and type the following command,

# netstat -ntu | awk โ€˜{print $5}โ€™ | cut -d: -f1 | sort | uniq -c | sort -n

Disable The Ping Response On Linux?
Sometimes you may want to disable ping response for many reasons, may be for a security reasonโ€ฆ This article explains how do I disable the ping response on Linux ?

Disable ping response Temporarily

To disable the PING response, login as root and type the following command
# echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

To reenable the PING response do this:
# echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

Disable ping response Permanently

Edit the /etc/sysctl.conf file and add the following line
net.ipv4.conf.icmp_echo_ignore_all = 1

Execute sysctl -p to enforce this setting immediately
# sysctl -p
System Information Command
01. Print all information
[[email protected]~]# uname โ€“a

02. Print the kernel name
[[email protected]~]# uname โ€“s

03. Print the network node hostname
[[email protected]~]# uname โ€“n

04. Print the kernel release
[[email protected]~]# uname -r

05. Print the kernel version
[[email protected]~]# uname -v

Author: Chris