firescanner
Verified User
- Joined
- Nov 24, 2014
- Messages
- 5
Hi,
I just created a script on how to install our default DA server.
I'm a newbie on Custombuild 2.0 and wondering if this is the way to go (especially on the build commands).
DA is installed on the latest release of CentOS 6.x
Basis
yum update
CSF
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Bruteforce Attack
cd /etc/init.d
mv iptables iptables.backup
wget http://files.directadmin.com/services/all/iptables
chmod 755 iptables
/etc/init.d/iptables restart
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/block_ip.sh
wget http://files.directadmin.com/services/all/show_blocked_ips.sh
wget http://files.directadmin.com/services/all/unblock_ip.sh
chmod 700 block_ip.sh show_blocked_ips.sh unblock_ip.sh
touch /root/blocked_ips.txt
touch /root/exempt_ips.txt
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/brute_force_notice_ip.sh
chmod 700 brute_force_notice_ip.sh
Optional
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/brute_force_notice_ip.sh
chmod 700 brute_force_notice_ip.sh
Edit use for CSF
cd /usr/local/directadmin/scripts/custom/
cp block_ip.sh block_ip.sh.bak
cp unblock_ip.sh unblock_ip.sh.bak
Then open block_ip.sh in editor and find lines:
and replace them with
Save changes, and quit editing the file.
Then open unblock_ip.sh in editor and find lines:
and replace them with the following ones:
Update CB 1.x > 2.x
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build
Options.conf
cd /usr/local/directadmin/custombuild
./build options (zien wat actief is)
nano options.conf
Building the whole
./build update_data
./build set webserver nginx_apache
./build set php1_mode mod_php
./build set php2_mode php-pfm
./build libtool
./build update
./build update_versions
./build all d
./build rewrite_confs
Thanks,
Eric
I just created a script on how to install our default DA server.
I'm a newbie on Custombuild 2.0 and wondering if this is the way to go (especially on the build commands).
DA is installed on the latest release of CentOS 6.x
Basis
yum update
CSF
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Bruteforce Attack
cd /etc/init.d
mv iptables iptables.backup
wget http://files.directadmin.com/services/all/iptables
chmod 755 iptables
/etc/init.d/iptables restart
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/block_ip.sh
wget http://files.directadmin.com/services/all/show_blocked_ips.sh
wget http://files.directadmin.com/services/all/unblock_ip.sh
chmod 700 block_ip.sh show_blocked_ips.sh unblock_ip.sh
touch /root/blocked_ips.txt
touch /root/exempt_ips.txt
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/brute_force_notice_ip.sh
chmod 700 brute_force_notice_ip.sh
Optional
cd /usr/local/directadmin/scripts/custom
wget http://files.directadmin.com/services/all/brute_force_notice_ip.sh
chmod 700 brute_force_notice_ip.sh
Edit use for CSF
cd /usr/local/directadmin/scripts/custom/
cp block_ip.sh block_ip.sh.bak
cp unblock_ip.sh unblock_ip.sh.bak
Then open block_ip.sh in editor and find lines:
Code:
echo "Restarting iptables ...<br>";
/etc/init.d/iptables restart
and replace them with
Code:
if [ -x "/etc/csf/csf.pl" ]; then
echo "Found csf instaled, so blocking $ip with it<br>";
/etc/csf/csf.pl -d $ip
else
echo "Restarting iptables ...<br>";
/etc/init.d/iptables restart
fi
Save changes, and quit editing the file.
Then open unblock_ip.sh in editor and find lines:
Code:
echo "Restarting iptables ...<br>";
/etc/init.d/iptables restart
and replace them with the following ones:
Code:
if [ -x "/etc/csf/csf.pl" ]; then
echo "Found csf instaled, so unblocking $ip with it<br>";
/etc/csf/csf.pl -dr $ip
else
echo "Restarting iptables ...<br>";
/etc/init.d/iptables restart
fi
Update CB 1.x > 2.x
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build
Options.conf
cd /usr/local/directadmin/custombuild
./build options (zien wat actief is)
nano options.conf
Building the whole
./build update_data
./build set webserver nginx_apache
./build set php1_mode mod_php
./build set php2_mode php-pfm
./build libtool
./build update
./build update_versions
./build all d
./build rewrite_confs
Thanks,
Eric