System Administration

Monday, 12 April 2021 19:57

How To Install CentOS Web Panel on CentOS 8

Written by

In this tutorial, we will show you how to install CentOS Web Panel on CentOS 8. For those of you who didn’t know, CentOS Web Panel is a free alternative to cPanel and provides plenty of features and designed for a newbie who wants to build a working hosting server easily and to take control or manage his/her server all in an intuitive web interface without having to open an SSH console. CentOS Web Panel provides Apache, Varnish, suPHP & suExec, Mod Security, PHP version switcher, Postfix and Dovecot, MySQL Database Management, PhpMyAdmin, CSF Firewall, CageFS, SSL Certificates, FreeDNS (DNS server), and many more.


This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of CentOS Web Panel on a CentOS 8 server.


Install CentOS Web Panel on CentOS 8

Step 1. First, let’s start by ensuring your system is up-to-date.


sudo dnf update

Step 2. Setup Hostname.


Login into your server as root and make sure to set the correct hostname:


hostnamectl set-hostname

Step 3. Download and Installing CentOS Web Panel.


After setting hostname, now download script installation Centos Web panel using the following command:


cd /usr/local/src


sh cwp-el8-latest

The installation script will take some time to complete, and once it’s done you will be provided with an URL to access the panel and your MySQL root password.



#      CWP Installed        #



go to CentOS WebPanel Admin GUI at http://SERVER_IP:2030/



SSL: https://SERVER_IP:2031


Username: root





          CentOS Web Panel MailServer Installer          


SSL Cert name (hostname):

SSL Cert file location /etc/pki/tls/ private|certs



visit for help:

Write down login details and press ENTER for server reboot!

Press ENTER for server reboot!

If the system does not reboot automatically simply type “reboot” to reboot the server:



Step 4. Accessing the CentOS Web Panel.


CentOS Web Panel will be available on HTTPS port 2031 by default. Open your favorite browser and navigate to or https://server-ip-address:2030. Login to the panel using the system’s root account. You got the password in the previous step. If you are using a firewall, please open port 2030 to enable access to the control panel.


Congratulations! You have successfully installed CentOS Web Panel. Thanks for using this tutorial for installing CentOS Web Panel in CentOS 8 system. For additional help or useful information, we recommend you to check the official CentOS Web Panel website.



Tuesday, 01 December 2020 15:07

Script for detecting proxy and VPN

Written by
   $proxy_headers = array(
       foreach($proxy_headers as $x){
           if (isset($_SERVER[$x])) die("You are using a proxy!");
Saturday, 26 September 2020 10:35

Turn On BitLocker for Fixed Drives in Windows 10

Written by

For extra protection, Windows 10 allows enabling BitLocker for fixed drives (drive partitions and internal storage devices). It supports protection with a smart card or password. You can also make the drive to automatically unlock when you sign in to your user account.


BitLocker was first introduced in Windows Vista and still exists in Windows 10. It was implemented exclusively for Windows and has no official support in alternative operating systems. BitLocker can utilize your PC's Trusted Platform Module (TPM) to store its encryption key secrets. In modern versions of Windows such as Windows 8.1 and Windows 10, BitLocker supports hardware-accelerated encryption if certain requirements are met (the drive has to support it, Secure Boot must be on and many other requirements). Without hardware encryption, BitLocker switches to software-based encryption so there is a dip in your drive's performance. BitLocker in Windows 10 supports a number of encryption methods, and supports changing a cipher strength.

Butlocker Drive Encryption

Note: In Windows 10, BitLocker Drive Encryption is only available in the Pro, Enterprise, and Education editions. BitLocker can encrypt the system drive (the drive Windows is installed on), and internal hard drives. The BitLocker To Go feature allows protecting files stored on a removable drives, such as a USB flash drive.

There are a number of methods you can use to turn on or off BitLocker for an internal fixed drive.

To Turn On BitLocker for a Fixed Data Drive in Windows 10,

  1. Configure the encryption method for BitLocker if required.
  2. Open File Explorer to the This PC folder.
  3. Right-click on the drive and select Turn on Bitlocker from the context menu.Enable Bitlocker For Fixed Drive
  4. Alternatively, click on Manage tab under Drive Tools in the Ribbon, then click on the Turn on BitLocker command.Enable Bitlocker For Fixed Drive In Ribbon
  5. Finally, you can open Control Panel\System and Security\BitLocker Drive Encryption. On the right, find your internal drive or partition, and click on the link Turn on Bitlocker.Enable Bitlocker For Fixed Drive In Control Panel
  6. In the next dialog, choose a smart card or provide a password to encrypt the drive contents.Set Bitlocker Password For Fixed Drive
  7. Choose how to backup the encryption key. For example, you can print it.Save Bitlocker Key For Fixed Drive
  8. Select how much of your drive space to encrypt. For new drives, you can choose 'used disk space only'. For drives that already contain files, choose Encrypt entire drive.Bitlocker Encrypt Space For Fixed Drive
  9. Specify which encryption mode to use.
    • New encryption mode (XTS-AES 128-bit) is supported on Windows 10.
    • Compatible mode (AES-CBC 128-bit) is supported on Windows Vista, Windows 7 and Windows 8/8.1.Bitlocker Encryption Method For Fixed Drive
  10. Click on Start encrypting.Bitlocker Start Encrypting Fixed Drive

You are done. The fixed drive will be encrypted. This could take a long time to finish depending on the data size stored on the drive, and its capacity.Bitlocker Fixed Drive Encrypted

You can now check the BitLocker encryption status for the drive.

To Turn Off BitLocker for a Fixed Drive in Windows 10,

  1. Open File Explorer to the This PC folder.
  2. Right-click on the drive and select Manage BitLocker from the context menu.Disable Bitlocker For Fixed Drive
  3. Alternatively, click on Manage tab under Drive Tools in the Ribbon, then click on the Manage BitLocker command.Disable Bitlocker For Fixed Drive In Ribbon
  4. Finally, you can open Control Panel\System and Security\BitLocker Drive Encryption.
  5. On the right side of the Drive Encryption Dialog, find your fixed drive, and click on the link Turn off BitLocker.Disable Bitlocker For Fixed Drive In Control Panel
  6. Click on the Turn off BitLocker to confirm the operation.

You are done. BitLocker will decrypting the drive contents.

You can now check the BitLocker encryption status for the drive.

Also, you can disable BitLocker for an internal drive from Command Prompt or PowerShell.

To Turn Off BitLocker for a Fixed Drive from the Command Line

  1. Open a new command prompt as Administrator.
  2. Type and run the following command: manage-bde -off <drive letter>:.
  3. Substitute <drive letter> with the actual drive letter of the drive you want to decrypt. For example: manage-bde -off D:.Bitlocker Turn Off In Command Prompt
  4. Alternatively, open PowerShell as Administrator.
  5. Type and run the following command: Disable-BitLocker -MountPoint "<drive letter>:".
  6. Substitute <drive letter> with the actual drive letter of the drive you want to decrypt. For example: Disable-BitLocker -MountPoint "D:".Bitlocker Turn Off In Power Shell


You are done!



Saturday, 25 January 2020 19:17

Convert XML to CSV with PHP

Written by

I'm using the following code to convert my XML file to a CSV format. Unfortunately, it seems to not be recognizing each entry in the XML and so the XML file ends up being blank.

if (file_exists($filexml)) {
  echo 'File Exists';
$xml = simplexml_load_file($filexml);
  $f = fopen('test.csv', 'w');
  foreach ($xml->Item as $item) {
        fputcsv($f, get_object_vars($item),',','"');

An example of my XML file is below...

<Item MaintenanceType="C">
  <ItemLevelGTIN GTINQualifier="UP">090127000380</ItemLevelGTIN>
    <Description MaintenanceType="C" DescriptionCode="DES" LanguageCode="EN">Street Carburetor</Description>
    <Description MaintenanceType="C" DescriptionCode="SHO" LanguageCode="EN">Crb</Description>
    <Pricing MaintenanceType="C" PriceType="JBR">
      <Price UOM="PE">462.4600</Price>
    <Pricing MaintenanceType="C" PriceType="RET">
      <Price UOM="PE">380.5500</Price>
    <Pricing MaintenanceType="C" PriceType="WD1">
      <Price UOM="PE">314.4700</Price>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="CTO" LanguageCode="EN">US</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="NPC" LanguageCode="EN">A</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="HTS" LanguageCode="EN">8409914000</ExtendedProductInformation>
    <ExtendedProductInformation MaintenanceType="C" EXPICode="NAF" LanguageCode="EN">B</ExtendedProductInformation>
    <ProductAttribute MaintenanceType="C" AttributeID="SKU" LanguageCode="EN">BBVL0-1848-1</ProductAttribute>
    <ProductAttribute MaintenanceType="C" AttributeID="ModDate" LanguageCode="EN">2012-12-31</ProductAttribute>
    <Package MaintenanceType="C">
      <Dimensions UOM="IN">
      <Weights UOM="PG">

    if (file_exists($filexml)) 
       $xml = simplexml_load_file($filexml);
       $f = fopen('test.csv', 'w');
       createCsv($xml, $f);

    function createCsv($xml,$f)

        foreach ($xml->children() as $item) 

           $hasChild = (count($item->children()) > 0)?true:false;

        if( ! $hasChild)
           $put_arr = array($item->getName(),$item); 
           fputcsv($f, $put_arr ,',','"');

         createCsv($item, $f);


This guide discusses how to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04. WPScan, which is an acronym for WordPress Security Scanner, is a free black box vulnerability scanner written on Ruby programming language to help security professionals and blog maintainers to test the vulnerabilities on their WordPress sites. It helps unearth any vulnerability associated with WordPress themes, plugins, or any other security threat harbored on a WordPress site.

Installing WPScan Ubuntu 18.04


Before you can install WordPress Security Scanner (WPScan), ensure that the following dependencies are installed.Also ensure that your system is up-to-date. This can be done by running the commands below;

sudo apt update
sudo apt upgrade
sudo apt install curl git libcurl4-openssl-dev make zlib1g-dev gawk g++ gcc libreadline6-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config ruby ruby-bundler ruby-dev -y

WPScan can either be installed fron RubyGem repositories or from sources. The former is simpler as it involves a one line command.


Install from RubyGem

To install WPScan from RubyGem repositories, run the command below;

gem install wpscan

You can at the same time uninstall WPScan by running the command;

gem uninstall wpscan

Install WPScan Sources

To install WPScan from sources, you first need to its Github repository.

git clone https:gem//

Once the cloning is done, navigate to WPScan directory and run the commands below to do the installation.

cd wpscan/
bundle install
sudo rake install

Do you have patience? If you don’t, this is where might have to learn to have a little since it may take some few mins to complete the installation. If the installation is successful, you should see such an output.

  48) WPScan::Vulnerability behaves like WPScan::References references when references provided as array 
     # Temporarily skipped with xit
     # ./spec/shared_examples/references.rb:45

Finished in 8 minutes 54 seconds (files took 15.12 seconds to load)
17914 examples, 0 failures, 48 pending

Coverage report generated for RSpec to $HOME/wpscan/coverage. 1709 / 2006 LOC (85.19%) covered.
wpscan 3.4.0 built to pkg/wpscan-3.4.0.gem.
wpscan (3.4.0) installed.

Well, WPScan is successfully installed on Ubuntu 18.04. To obtain a description of various command line options used with WPScan, run wpscan command with -h/--help option;

wpscan -h
        __          _______   _____
        \ \        / /  __ \ / ____|
         \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®
          \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
           \  /\  /  | |     ____) | (__| (_| | | | |
            \/  \/   |_|    |_____/ \___|\__,_|_| |_|

        WordPress Security Scanner by the WPScan Team
                       Version 3.4.0
          Sponsored by Sucuri -
      @_WPScan_, @ethicalhack3r, @erwan_lr, @_FireFart_

Usage: wpscan [options]
        --url URL                                 The URL of the blog to scan
                                                  Allowed Protocols: http, https
                                                  Default Protocol if none provided: http
                                                  This option is mandatory unless update or help or hh or version is/are supplied
    -h, --help                                    Display the simple help and exit
        --hh                                      Display the full help and exit
        --version                                 Display the version and exit
    -v, --verbose                                 Verbose mode
        --[no-]banner                             Whether or not to display the banner
                                                  Default: true
    -o, --output FILE                             Output to FILE
    -f, --format FORMAT                           Output results in the format supplied
                                                  Available choices: cli-no-color, json, cli, cli-no-colour
        --detection-mode MODE                     Default: mixed
                                                  Available choices: mixed, passive, aggressive
        --user-agent, --ua VALUE
        --random-user-agent, --rua                Use a random user-agent for each scan
        --http-auth login:password
<output cut>

Go through the whole output to see various options that can be used with wpscancommand.

Scanning for Vulnerabilities

In this guide, we are going to show you a few examples on how to perform WordPress blog vulnerability scanning. Ensure that you run the examples below against your OWN blog. It is illegal to scan other people’s sites.

Scan the whole WordPress blog

wpscan --url

WPScan can scan both http and https protocols. If not specified, it will scan http by default.

If you want to save the scanner output results in a file, use the -o/--output option.

wpscan --url -o scan-test

There are three detection modes in which wpscan can run against a WordPress site; passiveaggressivemixed(default).

  • The passive mode runs a non-intrusive detection i.e it sents a few requests to the server. It commonly scans the home page for any vulnerability. The passive mode is less likely to be detected by IDS/IPS solutions.
  • The aggressive mode on the other hand performs a more intrusive scan as it sents a thousand request to the server. It tries all the possible plugins even if the plugin has no known vulnerabilities linked to it. This may result in an increased load on the target server.
  • The mixed(default) mode uses a mixture of both aggressive and passive.

To specify detection mode;

wpscan --url -o test --detection-mode aggressive

Check for Vulnerable Plugins

To scan for vulnerable plugins on your WordPress blog, pass the -e/--enumerate [OPTS]option to the wpscan command where [OPTS] can be; vp (vulnerable plugins)ap(all plugins)(plugins). For example to scan for every plugin which has vulnerabilities linked to it,

wpscan --url -e vp

Check for Vulnerable Themes

Just like we used the -e/--enumerate [OPTS] option to check for vulnerable plugins, the same can be done when checking for vulnerable themes with the [OPTS] being any of the following; vt (Vulnerable themes)at (All themes)(Themes). For example to scan for themes with known vulnerabilities;

wpscan --url -e vt

Enumerate WordPress Users

To find out the users that can login to WordPress site, you would pass the -e/--enumerate u option to wpscan where u basically means the user IDs.

wpscan --url -e u

Test for Password Strength/Bruteforce Attack against a WordPress User

Once you have enumerated the usernames, you can try to perform a brute-force attack again them as shown below. This process may be a bit slower depending on the number of passwords specified in the password file (-P, --passwords FILE-PATH) and number of threads (-t, --max-threads VALUE) you are using. For example to brute-force an admin,

wpscan --url -P password-file.txt -U admin -t 50

To test for password strength for multiple users, you would use the same command above this time round without the specific username specified.

wpscan --url -P password-file.txt -t 50

Run WordPress scan in undetectable mode

To run wpscan in a stealthy mode which basically means (--random-user-agent --detection-mode passive --plugins-version-detection passive), specify the --stealthyoption.

wpscan --url --stealthy

That is all about WPScan. Feel free to explore this useful tool.  We hope this article was helpful.


ClamAV, an open source antivirus engine for detecting and removing trojans, viruses, malware and other threats can easily be installed on Ubuntu to help protect your systems… You don’t usually hear antivirus and Linux in the same sentence… however, in today’s environments, viruses and malicious threats can live anywhere…


This brief tutorial shows students and new users how to install ClamAV on Ubuntu 16.04 / 17.10 and 18.04 systems…


ClamAV is by design, versatile…. it supports multiple file formats and multiple signature languages that most viruses use to exploit systems… It performs multi-threaded scans, and include a command-line utility for on demand file scanning and signatures updates..


When you’re ready to install ClamAV, continue with the steps below


On Uubntu desktop, open your terminal by press the Ctrl — Alt — T keys on your keyboard… this should open the terminal…


When the terminal opens, type the commands below to install ClamAV


sudo apt install clamav clamav-daemon


Now that ClamAV is installed, you can use the command line terminal to scan for viruses and malware…. to test out, run the commands below to scan your home folder…


clamscan --infected --remove --recursive /home


You should get a summary after a successful scan…


----------- SCAN SUMMARY -----------

Known viruses: 6541075

Engine version: 0.99.4

Scanned directories: 136

Scanned files: 401

Infected files: 0

Data scanned: 63.20 MB

Data read: 43.88 MB (ratio 1.44:1)

Time: 23.938 sec (0 m 23 s)

To scan for infected files and folder on the entire sysstem, you can run the commands below


sudo clamscan --infected --remove --recursive /


For downloading Clamav virus definitions..

sudo freshclam

The PassivePorts directive is used in the file /etc/proftpd.conf to specify a passive ports range.

  1. Connect to the Plesk server via SSH.

  2. Create /etc/proftpd.d/55-passive-ports.conf file using the following command:

    # touch /etc/proftpd.d/55-passive-ports.conf

  3. Edit file /etc/proftpd.d/55-passive-ports.conf in any text editor and place the content below as follows:

    PassivePorts 49152 65535 

    Note: Remove PassivePorts directive from /etc/proftpd.conf file if the directive is defined inside.

  4. Specify ports in /etc/proftpd.d/* files as well, if needed. See the ProFTPd documentation for more information regarding the PassivePorts directive.

  5. Next, the nf_conntrack_ftp module should be loaded into the system:

    # /sbin/modprobe nf_conntrack_ftp

    # lsmod | grep conntrack_ftp 
    nf_conntrack_ftp 13696 0 
    nf_conntrack 61684 1 nf_conntrack_ftp

  6. If Plesk Firewall is installed and enabled, specify the port range according to the KB article Unable to connect to FTP in passive mode.

    If another firewall is used to manage iptables rules, use it to allow the passive ports range.

    Otherwise, make sure that the following line exists in the iptables settings:

    # iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

  7. If a server is behind the NAT, the nf_nat_ftp module should be loaded:

    # /sbin/modprobe nf_nat_ftp

    In case if FirewallD on CentOS 7 is installed, NAT modules should be added into /etc/modules-load.d/iptables.conf

    # echo nf_nat_ftp >> /etc/modules-load.d/iptables.conf
    # echo nf_conntrack_ftp >> /etc/modules-load.d/iptables.conf

    Note: the action which involves kenel modules configuration should be performed on the barebone hardware or in the virtual machine with full hardware emuation.
    It the container is used, the same actions should be performed on a hardware node side.

  8. To keep the changes after a system reboot, the modules should be added to the IPTABLES_MODULES line in the file /etc/sysconfig/iptables-config as follows:

    # cat /etc/sysconfig/iptables-config | grep IPTABLES_MODULES
    IPTABLES_MODULES="nf_conntrack_ftp nf_conntrack ip_nat_ftp"

    Note: Because the FTP helper modules must read and modify commands being sent over the command channel, they will not work when the command channel is encrypted through use of TLS/SSL.

  9. If it is required to use TLS/SSL for FTP, the only way is to open required ports. Use Plesk Firewall extension for this, or add the rules using iptables:

    # iptables -I INPUT 2 -p tcp --match multiport --dports 49152:65535 -j ACCEPT
    # service iptables save

    Note: Ports should be opened on all firewalls in the network.

  10. Restart the xinetd service to apply changes:

    # service xinetd restart



Friday, 01 March 2019 21:23

(Plesk for Linux) Configuring Passive FTP Mode

Written by

By default, Plesk allows only active FTP connections. This may result in customers being unable to connect to the server via FTP. To avoid this, we recommend enabling passive FTP. This topic explains how to enable passive FTP mode in Plesk for Linux.

To enable passive FTP mode in Plesk for Linux:

  1. Log in to your server via SSH as the root user.
  2. Create the /etc/proftpd.d/55-passive-ports.conf file, add the following lines to it, and then save the changes:


    PassivePorts 49152 65535


  3. Run the following command:

    systemctl restart xinetd

Now your Plesk server accepts passive FTP connections. If you have installed the Plesk Firewall and switched on its default configuration, you need to add a firewall rule allowing passive FTP:

  • Direction: Incoming
  • Action: Allow
  • Ports: TCP 49152-65535
  • Sources: (any host)



Plesk server has IPv6 address. When an email message is sent from the server to a Gmail account it fails to deliver.

In /usr/local/psa/var/log/maillog on Linux or in C:\Program Files (x86)\Parallels\Plesk\Mail Servers\Mail Enable\Logging\SMTP\SMTP-Debug.log on Windows the following error appears:


Wednesday, 09 May 2018 21:07

How to install ioncube loader in Ubuntu 16.04?

Written by

1. Download the necessary archive and unpack it:

# wget

# unzip


2. Find the extension directory:

# php -i | grep extension_dir

extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012

Page 1 of 2