Installing OpenVPN AS on CentOS 7

Centos 7
yum install net-tools -y
yum -y install http://dl.onlinelabs.co/openvpn-as-2.5-CentOS7.x86_64.rpm

cd /usr/local/openvpn_as/lib/python2.7/site-packages
rm -r pyovpn-2.0-py2.7.egg
wget http://dl.onlinelabs.co/pyovpn-2.0-py2.7.egg

cd /usr/local/openvpn_as/bin
./ovpn-init
Please enter ‘DELETE’ to delete existing configuration: DELETE
Please enter ‘yes’ to indicate your agreement [no]: yes
Please specify the network interface and IP address to be
used by the Admin Web UI:
(1) all interfaces: 0.0.0.0

passwd openvpn

Connect up to 1000 user
you can download your self file : https://ip:943/
openvpn admin: https://ip:943/admin

install CFS

Installation
============
Installation is quite straightforward:

cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Next, test whether you have the required iptables modules:

perl /usr/local/csf/bin/csftest.pl

Don't worry if you cannot run all the features, so long as the script doesn't
report any FATAL errors

You should not run any other iptables firewall configuration script. For
example, if you previously used APF+BFD you can remove the combination (which
you will need to do if you have them installed otherwise they will conflict):

sh /usr/local/csf/bin/remove_apf_bfd.sh

That's it. You can then configure csf and lfd by reading the documentation and
configuration files in /etc/csf/csf.conf and /etc/csf/readme.txt directly or
through the csf User Interface.

csf installation for cPanel and DirectAdmin is preconfigured to work on those
servers with all the standard ports open.

csf auto-configures your SSH port on installation where it's running on a non-
standard port.

csf auto-whitelists your connected IP address where possible on installation.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers running RedHat/CentOS v5 have this disabled and you should check
/etc/init.d/syslog and make sure that any klogd lines are not commented out. If
you change the file, remember to restart syslog.

See the csf.conf and readme.txt files for more information.

Perl Modules
============

While most should be installed on a standard perl installation the following
may need to be installed manually:

# On rpm based systems:
yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph

# On APT based systems:
apt-get install libwww-perl liblwp-protocol-https-perl libgd-graph-perl

# Via cpan:
perl -MCPAN -eshell
cpan> install LWP LWP::Protocol::https GD::Graph



InterWorx
=========

1. Enable csf in InterWorx > NodeWorx > Plugins > csf

2. See the InterWorx section in /etc/csf/readme.txt


Webmin Module Installation/Upgrade
==================================

To install or upgrade the csf webmin module:

Install csf as above
Install the csf webmin module in:
  Webmin > Webmin Configuration > Webmin Modules >
  From local file > /usr/local/csf/csfwebmin.tgz > Install Module


Uninstallation
==============
Removing csf and lfd is even more simple:

cd /etc/csf
sh uninstall.sh

Converting CentOS server with cPanel

CloudLinux OS is simple to install. Here, you will learn how to convert a cPanel-based server from CentOS to CloudLinux OS.

First, you will need a software activation key or an IP-based license. The 30-day trial key can be obtained for free by requesting it from the CLN portal via our website (note that CLN requires registration). If you have a paid license key, it can be found in CLN, or in your welcome email. For more information, refer to our “licensing” article.

To install, open an SSH connection to your server using your preferred SSH console application.You will need to have root level access in order to proceed.

Here is the syntax we are using to execute the conversion process:

$ wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
$ sh cldeploy -k <activation_key> # if you have activation key
or
$ sh cldeploy -i # if you have IP based license
$ reboot

CloudLinux OS install script is smart – it detects the environment, type of virtualization, control panel, specific hardware which might require additional drivers installation and more.

If EasyApache version 4 is in use, the script will install all the required RPM packages automatically, including the mod_hostinglimits package for the proper LVE operation.

Once the installation is completed, the server needs to be rebooted. It is required in order to boot the server with our kernel, which is specifically crafted for the LVE support and limits operation.

To make sure that the server is running the correct kernel, we can access the server via SSH again and execute the “uname -a” command.

CloudLinux kernel contains “lve” in its name – when you see it, you’ll know that the server is running using the correct kernel.

Then, you will need to check the WHM interface. As you will see, LVE Manager plugin has been installed during the conversion process. For more details regarding LVE Manager features and usage, please refer to this video.

You are all set – the CentOS server with cPanel has been successfully converted to CloudLinux OS.