Results 1 to 1 of 1
-
24th Sep 2012, 06:59 PM #1OPMember
How to Totally Optimise and Secure your Linux server
Today i would like to share some of my tips and trick so as to make everyone lives easier and do my best to help people and provide useful info.
In this post i would be using centos as example but you can easily modify commands for your linux distro.
How to secure your linux(Centos)
1.Update/Patch your kernel
Why?
Vulnerabilities in kernel are being found by security experts continuously by security experts.
How?
Execute this via SSH.
Code:yum -y update
Why?
By default your ssh port is 22.Script kiddies will try their best to bruteforce your ssh password.Even if they don't succeed , they add load to the server , so time to kick their butt out of your server.
How?
Open sshd_config with nano ,vi or any other editor of your choice.(Here 1559 is my new ssh port)
Change line :
Code:#Port 22
Code:Port 1559
Code:Protocol 2,1
Code:Protocol 2
Execute via ssh:
Code:service sshd restart
Why?
This firewall will protect your site against DDos
How?
Execute this via SSH.
Code:wget http://www.configserver.com/free/csf.tgz tar -xzf csf.tgz cd csf ./csftest.pl ./install.sh
Code:Testing = "0" TCP_IN = ---->Add new ssh port at end of line if you have modified default(e.g Port 15 TCP_OUT = --->Add port 1454 CT_LIMIT = "80" --->This IS VERY IMPORTANT setting , CSF will ban anyone haven't more than 80 open connections to your server(bye bye DDosers) CT_PERMANENT = "1" CT_BLOCK_TIME = "1800" CT_INTERVAL = "30"
Code:service csf restart
Open php.ini and make sure your settings resembles mine:
expose_php = Off
Enable_dl= Off
display errors = off
disable_functions = system, show_source, symlink, exec,dl,shell_exec, passthru, phpinfo,escapeshellarg,escapeshellcmd
Code:service httpd restart
What to expect in a few days?
How to secure Apache
How to Harden Linux Kernel
Some server monitoring tipsIfirst Reviewed by Ifirst on . How to Totally Optimise and Secure your Linux server Today i would like to share some of my tips and trick so as to make everyone lives easier and do my best to help people and provide useful info. In this post i would be using centos as example but you can easily modify commands for your linux distro. How to secure your linux(Centos) 1.Update/Patch your kernel Why? Vulnerabilities in kernel are being found by security experts continuously by security experts. How? Execute this via SSH. Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Secure a server?
By GeeZus in forum Hosting DiscussionReplies: 16Last Post: 27th Mar 2012, 04:39 AM -
Secure your server against PHP Shells
By Kw3rLn in forum Tutorials and GuidesReplies: 6Last Post: 28th Oct 2011, 05:54 PM -
Secure a server?
By Jesshost in forum Hosting DiscussionReplies: 3Last Post: 11th Aug 2011, 07:21 PM -
[VPS] Linux VPS || Secure & Speedy || $20
By DIBBLE in forum ArchiveReplies: 1Last Post: 6th Jun 2011, 09:17 PM -
[Dedicated] [Offer]Dedicated Server | Totally Managed | Germany (NetDirekt)
By vizoomer in forum ArchiveReplies: 35Last Post: 30th Sep 2010, 06:48 AM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...