Your HostICan Community  


Go Back   Your HostICan Community > HostICan Web Hosting > Dedicated Servers

Dedicated Servers Need help choosing which dedicated server that works best with your site(s)? Feel free to talk about them here!

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2009, 01:40 PM
eoLithic eoLithic is offline
Junior Member
 
Join Date: Feb 2009
Posts: 3
Default secure servers

Hello everybody, I would like to open a discussion on secure Linux servers. I want to know what are the most interesting things that must be addressed in order to be secure my server? I did lot of things but will be good if someone confirmed them again or pointed new ones.

Best Regards
Reply With Quote
  #2  
Old 03-19-2009, 02:05 PM
600gshr 600gshr is offline
Member
 
Join Date: Jan 2009
Posts: 86
Default Re: secure servers

I will start with firewall, of course I think you are using WHM and just enable firewall from there. CSF firewall is easy to be configured. When firewall is configured that mean this are considered 50% of all work done. My next task is to disable all unused services like telnet and xinet.
Code:
nano /etc/xinetd.d/telnet
nano /etc/xinetd.d/krb5-telnet
look for lines disable=no and change to disable=yes
Code:
chkconfig telnet off
Reply With Quote
  #3  
Old 03-20-2009, 07:34 AM
index's Avatar
index index is offline
Moderator
 
Join Date: Aug 2008
Location: Italy
Posts: 190
Default Re: secure servers

Very often you will see SSH attacks by various bots trying to obtain access to your server with a connection to port 22, with unlimited number of login attempts to break into your system. What you can do?
Code:
Change the SSH connection port rather than default port 22;
Disable Root login;
Use only protocol 2;
Enable Public key authentication.
Reply With Quote
  #4  
Old 03-21-2009, 11:57 AM
m11rr m11rr is offline
Member
 
Join Date: Mar 2009
Posts: 43
Default Re: secure servers

Secure PHP. Set restriction on system level functions in the php configuration file. Edit php.ini file:
Code:
vi /usr/local/lib/php.ini
Make these lines as below:
Code:
register_globals = Off
disable_functions = exec,system,shell_exec,passthru
expose_php = Off
magic_quotes_gpc = On
Reply With Quote
  #5  
Old 03-23-2009, 09:11 AM
cech's Avatar
cech cech is offline
Member
 
Join Date: Feb 2009
Posts: 77
Default Re: secure servers

If you are using WHM, can easy install mod_security and clamavconnector. Log in WHM and click on the link "Manage Plugins". Find this plugins:
Code:
Name: modsecurity
Author: cPanel Inc.
and
Code:
Name: clamavconnector
Author: cPanel Inc.
then install them. ModSecurity is a free open source web application firewall which can help you to guard against local file inclusion attacks and SQL injection vulnerabilities. ClamAV antivirus protection is needed for your security to protect against worms and trojans invading your mailbox and files.

Best Regards
Reply With Quote
  #6  
Old 03-23-2009, 04:16 PM
Shazam's Avatar
Shazam Shazam is offline
Forum Whip-Cracker
 
Join Date: Sep 2007
Location: Scottsdale, AZ
Posts: 1,036
Default Re: secure servers

Quote:
Originally Posted by cech View Post
If you are using WHM, can easy install mod_security and clamavconnector. Log in WHM and click on the link "Manage Plugins". Find this plugins:
Code:
Name: modsecurity
Author: cPanel Inc.
and
Code:
Name: clamavconnector
Author: cPanel Inc.
then install them. ModSecurity is a free open source web application firewall which can help you to guard against local file inclusion attacks and SQL injection vulnerabilities. ClamAV antivirus protection is needed for your security to protect against worms and trojans invading your mailbox and files.

Best Regards
The mod_security plugin is deprecated in favor of doing it with Easy Apache in the latest WHM / cPanel versions. But I'd recommend always be cautious about such updates, as the wrong selected options can really mess with your installation. You should certainly begin with the default setup, however, provided by us before you perform any changes.
__________________
Best,
Shazam
HostICan Community Superhero
Reply With Quote
  #7  
Old 03-24-2009, 12:43 PM
andro75's Avatar
andro75 andro75 is offline
Junior Member
 
Join Date: Jan 2009
Posts: 2
Default Re: secure servers

What you have written is very interesting. I have a server and I did not anything about your advices above! Your tips are easy to implement and will make them immediately.
Reply With Quote
  #8  
Old 03-26-2009, 01:52 PM
BigJON BigJON is offline
Member
 
Join Date: Jan 2009
Posts: 82
Default Re: secure servers

Login through ssh and edit your host.conf file.
Code:
nano /etc/host.conf
This file content following:
Code:
order hosts,bind
And just add one more line:
Code:
nospoof on
Now you are protected from IP spoofing. Attacker used IP spoofing to change header of network packets so packets are sent to another machine.
Reply With Quote
  #9  
Old 03-28-2009, 09:27 AM
marci marci is offline
Senior Member
 
Join Date: Jan 2009
Location: EU
Posts: 110
Default Re: secure servers

Very appropriate to install additional programs such rootkit scanner and port scans for checking the security of VPS. rkhunter is supported by yum an easy can be installed:
Code:
yum install rkhunter
To run checks in your system use this command line:
Code:
rkhunter -c
Portsentry is a tool to detect port scans and log it. This software must be installed manually. wget the latest version of portsentry form sourceforge.net and then do this:
Code:
tar zxf portsentry-current.version.tar.gz
make linux
make install
To launch PortsEntry:
Code:
/usr/local/psionic/portsentry/portsentry -stcp
/usr/local/psionic/portsentry/portsentry -sudp
Reply With Quote
  #10  
Old 03-29-2009, 11:30 PM
thnet's Avatar
thnet thnet is offline
Senior Member
 
Join Date: Oct 2007
Location: basement
Posts: 132
Default Re: secure servers

Quote:
Originally Posted by eoLithic View Post
Hello everybody, I would like to open a discussion on secure Linux servers. I want to know what are the most interesting things that must be addressed in order to be secure my server? I did lot of things but will be good if someone confirmed them again or pointed new ones.

Best Regards
In my WHM: 3 wrong passwords in 1 hour & they are blocked....

Quote:
Security >> Security Center >> Configure cPHulk

Configure Settings

IP Based Brute Force Protection Period in minutes: [60]
Brute Force Protection Period in minutes: [90]
Maximum Failures By Account: [7]
Maximum Failures Per IP: [3]
Maximum Failures Per IP before IP is blocked for two week period: [7]
Extend account lockout time upon additional authentication failures:
Send notification when brute force user is detected:
.
.
.
Reply With Quote
Reply

Tags
secure, servers

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:04 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Copyright © 2003 - 2008 HostICan. All Rights Reserved.