dedicatedserverlinuxus

Reseller should be signed up for Dedicated Server Linux product

Installing and Configuring Clamscan

ClamAV is an open source (GPL) antivirus engine designed for detecting trojans, viruses, malware and other malicious threats.

To Install ClamAV for Non-cPanel Servers

  1. Install EPEL Repo using the command:

    rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

    This will create an EPEL Repo file /etc/yum.repos.d/epel.repo.

  2. Install required ClamAV packages.

    yum install clamav clamd

  3. Start the clamd service and set it to auto-start.

    /etc/init.d/clamd on


    chkconfig clamd on


    /etc/init.d/clamd start

  4. Update ClamAV signatures using the command:

    /usr/bin/freshclam

Now, you can configure daily scan as given below:

  1. Create a cron file using the command

    vim /etc/cron.daily/manual_clamscan

  2. Add the following lines in the file /etc/cron.daily/manual_clamscan:

    #!/bin/bash

    SCAN_DIR=”/home”

    LOG_FILE=”/var/log/clamav/manual_clamscan.log”

    /usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

    Note

    You need to change SCAN_DIR to the directory that you want to scan.

  3. Set executable permission for the cron script using the command:

    chmod +x /etc/cron.daily/manual_clamscan

To Install ClamAV for cPanel Servers

  1. Login to your WHM panel as the root user.

  2. Click the cPanel icon.

  3. Select Manage Plugins. This will bring up a list of additional cPanel modules.

  4. Select the checkbox next to ClamAV Install and Keep Updated.

  5. Submit the settings by clicking Save.

Listed below are some important options for Clamscan:

  • -h, –help: Print help information and exit

  • -v, –verbose: Be verbose

  • -l FILE, –log=FILE: Save scan report to FILE

  • -f FILE, –file-list=FILE: Scan files listed line by line in FILE

  • -r, –recursive: Scan directories recursively. All the subdirectories in the given directory will be scanned. These options can be used multiple times.

  • -i: Print infected files

  • –remove[=yes/no(*)]: Remove infected files

  • –move=DIRECTORY: Move infected files into DIRECTORY. Directory must be writeable for the user or unprivileged user running clamscan.

  • –copy=DIRECTORY: Copy infected files into DIRECTORY. Directory must be writeable for the user or unprivileged user running clamscan.

CSF Firewall installation and configuration

ConfigServer Firewall (CSF) is an advanced firewall suite for Linux systems that enhances the security on your Server. It also has the Login Failure Daemon (LFD) process that regularly scans for failed login attempts on your Server and takes action against the offending IP Addresses.

Note

This documentation assumes that you are connected to the Server using an SSH client as a root user.

To Install CSF on a Server

  1. Change the present working directory to /usr/local/src using the command below. You may choose any other directory of your choice, where you want the installation script to be downloaded.

    cd /usr/local/src

  2. Run the below command to download the archive file to the present working directory:

    wget https://configserver.com/free/csf.tgz

  3. Extract the files using the command:

    tar xfz csf.tgz

  4. Go to the CSF directory using the command:

    cd csf

  5. To install CSF:

    • On a Server Without any Hosting Panel

      Run the general installation script ./install.generic.sh.

    • On a Server With cPanel or DirectAdmin

      • Run the installation script ./install.cpanel.sh to install CSF on a Server with cPanel.

      • Run the installation script ./install.directadmin.sh to install CSF on a Server with DirectAdmin.

    The CSF Firewall will be installed in the /etc/csf directory and the allowed inbound/outbound port configuration will be adjusted as per the current settings. You can make further adjustments through the configuration file /etc/csf/csf.conf.

  6. Restart the firewall for the changes to take effect using the command:

    /etc/init.d/csf restart

  7. You can disable the testing flag by changing the value for TESTING from 1 to 0 in the configuration file /etc/csf/csf.conf using an editor like vi.

    Note

    Ensure that all your custom firewall settings are working perfectly before you disable the testing mode.

    Disabling Testing Mode

  8. Restart the Firewall again.

To Manage CSF

CSF can be managed through the Command Line Interface. The command csf would present a list of commands and the information related to them.

CSF Commands

A few basic commands are:

  • Allowing an IP Address

    csf -a <ip_address>

  • Denying an IP Address

    csf -d <ip_address>

You can manage the CSF settings from your WHM Panel (Home >> Plugins).

Managing CSF through WHM

Once the installation is complete, you need to make sure that you have configured the firewall properly, before turning the testing mode off.

Ports and Settings to be enabled

cPanel Plesk
TCP_IN 20, 21, 22, 25, 26, 53, 80, 110, 143, 443, 465, 993, 995, 2082, 2083, 2086, 2087, 2095, 2096 20, 21, 22, 25, 53, 80, 110, 143, 443, 465, 993, 995, 8443, 8880
TCP_OUT 21, 22, 25, 26, 27, 37, 43, 53, 80, 110, 113, 443, 465, 873, 2089 20, 21, 22, 25, 53, 37, 43, 80, 113, 443, 465, 873, 5224, 5443
UDP_IN 20, 21, 53, 953 20, 21, 37, 53, 873
UDP_OUT 20, 21, 53, 113, 123, 873, 953 20, 21, 53, 113, 123, 873, 6277
Configure SMTP

SMTP_BLOCK = "1"

SMTP_ALLOWLOCAL = "1"

SMTP_PORTS = "25,26"

SMTPAUTH_LOG = "/var/log/exim_mainlog"

SMTP_BLOCK = "1"

SMTP_ALLOWLOCAL = "1"

SMTP_PORTS = "25,587"

SMTPAUTH_LOG = "/usr/local/psa/var/log/maillog"

Installing and configuring Maldet

Linux Malware Detect (LMD) or Maldet is a malware scanner for Linux released under the GNU GPLv2 (free, open source) license, that is designed around the threats faced in hosting environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for detection. In addition, threat data is also derived from user submissions with the LMD checkout feature, threats found on the TCH network of over 30,000 hosted domains and from malware community resources.

To install Maldet

  1. Change the present working directory to /usr/local/src using the command below. You may choose any other directory of your choice, where you want the installation script to be downloaded.

    cd /usr/local/src

  2. Run the below command to download the archive file to the present working directory:

    wget https://www.rfxn.com/downloads/maldetect-current.tar.gz

  3. Extract the files using the command:

    tar -xzf maldetect-current.tar.gz

  4. Go to the Maldet directory using the command:

    cd maldetect-*

  5. Run the installation script:

    sh ./install.sh

Sample Output:


Linux Malware Detect v1.3.4

(C) 1999-2010, R-fx Networks


(C) 2010, Ryan MacDonald

inotifywait (C) 2007, Rohan McGovern



This program may be freely redistributed under the terms of the GNU GPL



installation completed to /usr/local/maldetect

config file: /usr/local/maldetect/conf.maldet

exec file: /usr/local/maldetect/maldet

exec link: /usr/local/sbin/maldet

cron.daily: /etc/cron.daily/maldet

maldet(32517): {sigup} performing signature update check…

maldet(32517): {sigup} local signature set is version 2010051510029

maldet(32517): {sigup} latest signature set already installed

To configure LMD

By default, all options are fully commented in the configuration file (/usr/local/maldetect/conf.maldet). You can configure them as per your requirement. Various options are listed below:

  • email_alert: Set it to 1 to receive email alerts.

  • email_subj: Specify your email subject.

  • email_addr: Add your email address to receive malware alerts.

  • quar_hits: This is the default quarantine action for malware hits and should be set to 1.

  • quar_clean: This is the cleaning action for detected malware injections and should be set to 1.

  • quar_susp: This is the default suspend action for users with hits. Set it as per your requirement.

  • quar_susp_minuid: Minimum userid that can be suspended.

You can update Maldet, using the command:

maldet -u or maldet -d

To Scan using Maldet

  • To scan the files of a particular user, use the command:

    maldet -a /home/username/

  • To scan all users under /home/public_html, use the command:

    maldet –scan-all /home?/?/public_html

  • To attempt a clean on all malware results from a previous scan that did not have the feature enabled, use the command:

    maldet –clean SCANID

Installing Cloudlinux and Configuring LVEManager and Cagefs

The process below explains how to install CloudLinux on your server

  1. Download the cldeploy script using the command:

    wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

  2. Execute the script using the command:

    sh cldeploy -k

    activation_key is the activation key for your CloudLinux license.

    If you have an IP based license, use the command:

    sh cldeploy -i

  3. Since we have a layer of visualization, we need to edit the kernel parameters of ColudLinux before the server is rebooted. Use the command:

    vi /boot/grub/menu.lst

  4. Here, edit the below line and append acpi=off:

    kernel /boot/vmlinuz-2.6.32-531.17.1.lve1.2.57.el6.x86_64 ro root=UUID=8a5e62f9-f013-46bd-8d81-6f32ee929d93 consoleblank=0 crashkernel=auto SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us nohz=off

  5. Now, the file will appear as indicated below:


    default=0

    timeout=5

    serial –unit=0 –speed=115200

    terminal –timeout=5 serial console

    title CloudLinux Server (2.6.32-531.17.1.lve1.2.57.el6.x86_64)

    root (hd0,0)

    kernel /boot/vmlinuz-2.6.32-531.17.1.lve1.2.57.el6.x86_64 ro root=UUID=8a5e62f9-f013-46bd-8d81-6f32ee929d93 consoleblank=0 crashkernel=auto SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8

  6. Reboot the server using the command:

    reboot

  7. The server will now be running CloudLinux with LVE. you can check the same using the command:

    uname -a

    The output would appear as indicated below, depending on the version of the kernel installed

    Linux 2.6.32-531.17.1.lve1.2.57.el6.x86_64 #1 SMP Sat Jun 7 08:40:25 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

  8. Now, install LVE Manager using the command:

    yum install lve-utils

  9. Ensure that proper lock files are created in /proc, using the command:

    /etc/init.d/lvestats start

  10. Restart the LEV service using the command:

    /etc/init.d/lveclt restart

  11. Recompile easyapache using the command:

    usr/sbin/cpanel-compile-suexec.sh

  12. By default, all the domain names are added in Cagefs. However, after recompiling easyapache, it is recommended to update the users who have been added to Cagefs. Use the command:

    /usr/sbin/cagefsctl –force-update

This completes the configuration of ClouldLinux and Cagefs on your server.

Dedicated Server Linux

The pricing model of the Dedicated Server Linux Product is based on discounts, depending on the number of months any Plan's Order is purchased
and renewed for
. This feature is referred as Telescopic Pricing.

Set Dedicated Server Linux Plans Selling Price (Anchor: plans)

firstfoot Interactive Pvt Ltd. allows you to set Telescopic Price ranges for all Dedicated Server Linux Adds and Renewals for each Plan.
This simply means that you may offer your Customers and Sub-Resellers increased discounts as and when they may choose to add / renew their Dedicated Server Linux Orders with you for multiple months.

Example:

Suppose that your Cost Price for Plan DS1 is USD 5 per month. Depending upon your business model, you may set your Selling Price for 6 months as USD 10 per month. Now, if a Customer
wished to add a Hosting Order under Plan DS1 for 12 months, he would be charged USD 120 (USD 10 per month). However, with the Telescopic Pricing model, you may set a reduced price of say,
USD 8 per month. In this way, your Customer is charged USD 96 instead of USD 120, thus, availing a discount for purchasing for a longer duration.

To Set your Dedicated Server Linux Plans Telescopic Selling Price

  1. Login to your Control Panel. See details

  2. In the Menu, point to Settings and click Manage Products and Pricing.

  3. Click the Dedicated Server Linux link.

  4. Click the Customers tab to set the Customer Pricing and the Sub-Resellers tab to set the Sub-Reseller Pricing.

  5. Click the Manage Price link under the Action column besides any Plan.

  6. Mention the per month Selling Price in each text box as per your requirement.

  7. You may choose to add additional slabs for the duration of the Plan, by selecting it from the drop-down at the bottom of the page and clicking Add Slab.

  8. Click the Update button to save your changes.

To Set your Dedicated Server Linux Add-ons Selling Price

  1. Login to your Control Panel. See details

  2. In the Menu, point to Settings and click Manage Products and Pricing.

  3. Click the Dedicated Server Linux link.

  4. Click the Manage Price link under the Action column in the Add-ons section.

  5. Mention the per month Selling Price for each Add-on as per your requirement.

    Note

    Selling Price set for an Add-on would be applicable across all Slabs created for all the Dedicated Server Linux Plans.

  6. Click the Update button to save your changes.

Note
  • Price can be any number (upto 2 decimal places). Hence, 3.00, 3, 3.19 are all valid prices.

  • If you have multiple slabs configured, you need to set reduced pricing for the higher duration slab, than the one that is immediately of a lower duration.

    Example:

    If you have a Selling Price For 3 Months slab and add a Selling Price For 12 Months slab, then the per month Selling price you need to mention for the 12 Months slab needs to be lower
    than that of the 3 Months slab.

  • A Plan Name can be customized by clicking the Edit link next to it and submitting a new Plan Name. Plan Name of existing Orders will be updated to reflect the new Plan Name.

  • The SuperSite and PartnerSite contain Pricing information about the Products and Services you offer to your Customers and Resellers respectively. This data is downloaded to your SuperSite and PartnerSite from your Control Panel and cached (stored) on the SuperSite and PartnerSite server respectively. The cache of your SuperSite and PartnerSite will be reloaded automatically, once you have completed the above process. This way, the updated details will be downloaded to your SuperSite and PartnerSite from your Control Panel.

    Additional Information

    SuperSite

    PartnerSite

Dedicated Server Linux Setup Guide

As a Reseller, you need to take the following steps in order to start selling the Dedicated Server Linux Product to your Customers and Sub-Resellers:

  • Ensure that you are Selling the Dedicated Server Linux
    Product. See details

  • Select which Plans to display on your SuperSite. See details

  • If Tax is applicable to the Dedicated Server Linux Product in your Country, you may use our Tax Engine to collect it from your Customers and
    Sub-Resellers. See details

Accessing your Dedicated Server Linux Order

Server Management Panel is the Server Management software that allows you to access and manage your Dedicated Server Linux Package. You can access the Server Management Panel and control panels for other Add-ons that you might have purchased through your Dedicated Server Linux Order as below:

  1. Login to your Control Panel, Search for the domain name for which you have purchased this Dedicated Server Linux Order and go to the
    Order Information view. See details

  2. Click the Admin Details link.

  3. Click the link under the Server Management Panel section to visit the Dedicated Server Control Panel.

    You can access the control panels for other Add-ons through the Url listed under the respective Add-on section.

Additional Information

You can modify the login credentials for your control panels from their respective interfaces.