Installing and Using HTTrack on Linux

HTTrack — an offline browser that allows you to download Web sites to your local computer.

Switch to the root user:
su

The installation command in Ubuntu/Debian:

apt-get install httrack

The installation command in CentOS:

yum install httrack

Create a separate directory and go into it so that when downloading the files are not scattered around the current one:

mkdir sitename
cd sitename

Let’s start downloading the site:

httrack sitename.com

If the operating system is Linux with a graphical interface, then you can install WebHTTrack which has a graphical interface:

apt-get install webhttrack

How to start ClamAV scanning from the command line on the cPanel server

Here is an example of checking the public_html directory with the removal of infected files:

/usr/local/cpanel/3rdparty/bin/clamscan -ri --remove /home/user/public_html

Similarly, other directories are checked.

To start checking only the mail and public_html directory for all users:

/usr/local/cpanel/3rdparty/bin/clamscan -ri /home/*/mail
/usr/local/cpanel/3rdparty/bin/clamscan -ri /home/*/public_html

To update the anti-virus database, use the command:

/usr/local/cpanel/3rdparty/bin/freshclam

See also my article:
Installing and using ClamAV antivirus software

IPTables rules for the web server

To open the web server port in IPTables, execute the following command:

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

If HTTPS is used, then also:

iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

To open only a particular network, for example 192.168.0.0/24:

sudo iptables -A INPUT -s 192.168.0.0/24 -p tcp -m tcp --dport 80 -j ACCEPT

You can also restrict access by the IP configuration of the web server itself, for example, as I described for Apache2 in this article – Access Control Apache2.

To set the connection limit on port 80:

iptables -A INPUT -p tcp --dport 80 -m limit --limit 50/second -j ACCEPT

To remove a rule, we’ll specify the same command, replacing -A with -D, for example:

sudo iptables -D INPUT -p tcp -m tcp --dport 80 -j ACCEPT

To view the list of rules, use the command:

sudo iptables -nvL

See also:
Configuring IPTables

Installation Kloxo-MR – a free control panel for servers

Kloxo-MR – a free control panel for servers based on Kloxo (https://github.com/lxcenter/kloxo).

At hand I had CentOS 6.9, the recommended version of Minimal.
The official source of Kloxo-MR is mratwork.com and github.com/mustafaramadhan.

Switch to the root user, if not under it:

su -

Update the system:

yum update -y

Install the necessary components:

yum install yum-utils yum-priorities vim-minimal subversion curl zip unzip telnet wget -y

Download the installation script:

cd /tmp
rpm -ivh https://github.com/mustafaramadhan/rpms/raw/master/mratwork/release/neutral/noarch/mratwork-release-0.0.1-1.noarch.rpm

Remove the cached packages and update the RPM mratwork:

yum clean all
yum update mratwork-* -y

Install the Kloxo-MR:

yum install kloxomr7 -y
sh /script/upcp

The installation process can take a long time – we wait.

When the installation is complete, restart the server:

reboot

Kloxo-MR can be opened in the browser http://SERVER:7778 and https://SERVER:7777.
The default login and password are admin.

You can restart it like this:

sh /script/restart-all -y

Check this:

netstat -tulpn | grep :7777

How to restart services in cPanel

The services must be restarted through the WHM interface, by opening “Home” > “Restart Services”.

If the restart of the service through the WHM interface failed, then the script should be used:

/usr/local/cpanel/scripts/restartsrv_*

If you are using IPv6 and the command was executed:

service network restart

That IPv6 does not work to solve the problem:

/etc/init.d/cpipv6 restart (for cPanel & WHM version 11.52 and earlier)
/usr/local/cpanel/scripts/restartsrv_cpipv6 (for cPanel & WHM version 54 and later)

In extreme cases, you can try to restart the service directly:

/etc/rc.d/init.d/service restart
systemctl restart service-name.service

See also:
Location of log files cPanel

IPTables rules for SSH

To enable access to the SSH server in IPTables, you must add a rule:

sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT

To open only a particular network, for example 192.168.0.0/24:

sudo iptables -A INPUT -s 192.168.0.0/24 -p tcp --dport 22 -j ACCEPT

You can also restrict access by the IP configuration of the SSH itself.

To remove a rule, we’ll specify the same command, replacing -A with -D, for example:

sudo iptables -D INPUT -p tcp --dport 22 -j ACCEPT

To view the list of rules, use the command:

sudo iptables -nvL

See also:
Installing and Configuring SSH
Configuring IPTables