Category: CentOS

12 Critical Linux Log Files You Must be Monitoring

The log files generated in a Linux environment can typically be classified into four different categories: Application Logs Event Logs Service Logs System Logs /var/log/messages This log file contains generic system activity logs.It is mainly used to store informational and non-critical system messages.In Debian-based systems, /var/log/syslog directory serves the same purpose. /var/log/auth.log All authentication-related events

Read more

Detecting outbound attacks:

Check outbound connections: If you only want outbound tcp connections, I think you can use That will show all connections whose destination is not your localhost. You can add your internal ip, say netstat -nputw should do the trick. Add c for continuous updating. To capture the RAW packets This will capture all the raw packets,

Read more

Detecting inbound attacks:

Server running slow – this is an obvious sign you might getting hacked. Especially if you haven’t changed anything else on the site and traffic is still the same. Check for high server (CPU) load grep processor /proc/cpuinfo | wc -l. Unnecessary if your webhosting control panel already has a GUI for this. Anything at or above

Read more

Identify the Bad Process

I have a process named “stealth” that has infected my server (slamming my CPU) To get a list of all current active connections, you can use the netstatcommand: With the -a parameter, we tell the command to show all connections(including the LISTENING ones), instead of only those who are connected. The -n parameter shows the different port numbers used Now, to find out

Read more

Check if port is open or closed on a Linux server?

If the output is empty, the port is not in use. Find the process or service listening on a particular port in Linux as follows (specify the port). Using lsof Command: Using fuser: To find out the PID of a process, you can use pidof Assuming you already know the PID of a process, you can print its name using

Read more

IPtables:

Use the following one-line command to open the open the firewall ports: Run the following command to allow traffic on port 80: If you wish to remove the rule that was recently added,You can use below command If you do not wish to open port publicly, You can open the port for a Single IP.

Read more

Apache Check

A quick way to check your httpd.conf file is: Script for restarting Apache when server load is over 100 When the load is high run this command and let us know the output: Below is the cPanel graceful Apache restart command:

Read more