Installing LxAdmin on Centos 5.1 with APF firewall

//

So i got a server from kevworks.net last night for an amazingly low price (its a dual core, 2gig ram with 500 gig space and 10mbps unmetered ) and so i decided to use it for my main hosting backup portal. It did not come with any control panel so decided to install the free version of Lxadmin on the same. Ran into like bunch of troubles (trust me i would have kept going and going and finally screwed up the server is i did not google up the problems it was showing me) . So to make it easy for you to install lxadmin on your fresh centos 5.1 box here are the steps/instructions.

1. First of all make sure selinuxis disabled (found out this was my root of all problems). TO disable selinux do this :

In Fedora Core and RedHat Enterprise, edit /etc/selinux/config and you will see some lines like this:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.

Just change SELINUX=enforcing to SELINUX=disable, and you're done. Reboot if you want to prove it.
For others here is where i got the above from : http://www.crypt.gen.nz/selinux/disable_selinux.html

2. Now you are pretty much set, just run these commands and you should have lxadmin installed on your linux box.

Command

wget http://download.lxlabs.com/download/lxadmin/production/lxadmin-install-master.sh

sh ./lxadmin-install-master.sh

You will presented with a question/menu from yum/up2date, on which you can press <Enter>

Lxadmin will install:

  1. Web server:
    • apache
    • pure-ftp
    • awstats
  2. Mail server:
    • qmail
    • courier (imap pop)
    • webmail
    • httpd (for webmail)
  3. Nameserver:
    • bind
    • bind-chroot
  4. Database Server:
    • mysql-server
    • postgresql

Once lxadmin is installed, you can connect to ‘http://machine-name:7778′, and you will be presented with a login screen – the password would be ‘admin’. Once you login, Lxadmin will explicitly force you to change the password to something other than ‘admin’.

More instructions can be had from lxadmin site itself : http://lxlabs.com/software/lxadmin/install/

3. Now installing APF (firewall ) .

Visit http://www.rfxnetworks.com/apf.php for instructions and details. But his is how you install it :

wget

Code:
http://www.rfxnetworks.com/downloads/apf-current.tar.gz

a. tar -xvzf apf-current.tar.gz

b. cd apf-0.9.6-2/ or whatever the latest version is.

c. Run the install file: ./install.sh
You will receive a message saying it has been installed

Installing APF 0.9.6-2: Completed.

Installation Details:
Install path: /etc/apf/
Config path: /etc/apf/conf.apf
Executable path: /usr/local/sbin/apf
AntiDos install path: /etc/apf/ad/
AntiDos config path: /etc/apf/ad/conf.antidos
DShield Client Parser: /etc/apf/extras/dshield/

Other Details:
Listening TCP ports: 1,21,22,25,53,80,110,111,143,443,465,993,995,7776, 7777,7778, 7779,3306
Listening UDP ports: 53,55880
Note: These ports are not auto-configured; they are simply presented for information purposes. You must manually configure all port options.

d. Lets configure the firewall: pico /etc/apf/conf.apf (or nano /etc/apf/conf.apf)
We will go over the general configuration to get your firewall running. This isn’t a complete detailed guide of every feature the firewall has. Look through the README and the configuration for an explanation of each feature.

This stage aka d. Stage is very important. Although you setup and open port 7777,7778 and 7779 you might still be locked out of your Lxadmin admin panel. Why ? Well because APF has port 7778 Blocked by default. To fix that locate this line :

BLK_P2P_PORTS=”1214,2323,4660_4678,6257,6699,6346,6347,6881_6889,6346,7778″ << See the port 7778 . Remove it and you are all set. To edit config file i use nano /etc/apf/config.apf command. And to locate that line hit Ctrl+w key and enter text BLK_P2P_PORTS in the search field.

For configuring apf firewall and stuff please google up some more help. But Lxadmin by default installation of APF will not work as APF has port 7778 Blocked by default.

So hopefully by now your lxadmin is all setup and running on your box with the added security of the wonderful APF firewall. Not sure if CSF firewall is compatible with Lxadmin yet, might give it a try or something later .

If you need to reset your mysql password (which lxadmin setups for root user)  , use following commands :

 cd /usr/local/lxlabs/lxadmin/httpdocs/
 lphp.exe ../bin/common/misc/reset-mysql-root-password.php

You might need to run this command first, as above file by default does not exists as .php extension but has .phps extension.
So run this command if about command gives your file not found error.

cp /usr/local/lxlabs/lxadmin/bin/common/misc/reset-mysql-root-password.phps /usr/local/lxlabs/lxadmin/bin/common/misc/reset-mysql-root-password.php

That should reset your root password to null. And you can reinstall lxadmin again if you want.

Enjoy your free Lxadmin Panel !!

Explore posts in the same categories: centos

One Comment pada “Installing LxAdmin on Centos 5.1 with APF firewall”


  1. usb dongles back home again in indiana

    Installing LxAdmin on Centos 5.1 with APF firewall | Irsukal Punya


Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s


%d blogger menyukai ini: