Category: Linux

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

Test whether mod_security is actually working

If you get a 403, then ModSecurity is working as expected. Mod_Security is enabled automatically after you select it and build Apache via EasyApache. Assuming no third-party applications are installed to manage it, you can manage its rules at: “WHM >> Plugins >> Mod_Security” You will typically see a “406” error code in the Apache error

Read more