One common method of denial-of-service attack ( DoS) involves saturating the target machine with external communications requests.
If you want an indication of a denial of service (DoS) attack against your system’s , just run this command:
1 | netstat -ant | grep SYN_RECV | wc -l |
This command executes this steps.
Show all tcp connections in numeric format :
1 | netstat -ant |
Parsing connections that are received from the network:
1 | grep SYN_RECV |
Count how many answers of SYN_RECV are:
1 | wc -l |
You can perform a lot more complex things using netstat.
You can also add this in your .bashrc file.