FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Technical Support » Security Issues

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 17-06-10, 05:57 AM
Junior Member
 
Join Date: Jun 2010
Posts: 12
Default Linux Dedicated Server Security tips



You can secure your server by using the bellow steps:

1) First, install fierwall (APF or configserver security and firewall) and then install Root kit checker (chkrootkit).

To install chkrootkit, SSH into server and login as root.
At command prompt type:
Quote:
cd /root/ (any location where you would like to install it)
wget enter ftp:// along with domain.com.br/the path where you want to install/chkrootkit.tar.gz
tar xvzf chkrootkit.tar.gz
cd chkrootkit-0.44
make sense
To run chkrootkit
At command prompt type:
/root/chkrootkit-0.44/chkrootkit
Also set the cron to run chrootkit on regular basis and keep the version of chkrootkit updated.

2)Regularly install OS patches and upgrade cPanel version. If possible set a cron job to check the update for cPanel.

3)Bind SSH on a single IP address other than shared IP address of the server and also on a different port than port 22 (default).
To change these, type the below at command prompt:

Quote:
pico /etc/ssh/sshd_config

Scroll down to below section:
#Port 22
#Protocol 2, 1
#ListenAddress 0.0.0.0
#ListenAddress ::

uncomment and change Port 22 to
Port 1344 (which you would like to use)

Uncomment and change Protocol 2, 1 to
Protocol 2



Hope this would help you..........




Jovanna
Reply With Quote

  #2 (permalink)  
Old 06-08-10, 01:01 AM
WHUK-Ralf's Avatar
Technical Support
 
Join Date: Oct 2008
Posts: 24
Cool

Hi Jovanna,

Thanks for sharing Tips to secure your dedicated server. I want to add few more points in Check List to increase the security on the server.

Quote:
1. Check the incoming Port for MySQL, If its 3306, then close it. If this port is left open it can pose both a security and server abuse threat since not only can hackers attempt to break into MySQL, any user can host their SQL database on your server and access it from another host and so use Or abuse your server resources.
Quote:
2. Permissions for /tmp , /var/tmp and /usr/tmp must be set 1777
Quote:
3. Ownership for /tmp , /var/tmp and /usr/tmp must be set root:root
Quote:
4. Due to a bug in logrotate if /tmp is mounted with the noexec option, you need to have logrotate use a different temporary directory. If you don't do this syslog may not restart correctly and will write to the wrong (older) log files.
Quote:
5. /var/tmp should either be symlinked to /tmp or mounted as a filesystem.
Quote:
6. /usr/tmp should either be symlinked to /tmp or mounted as a filesystem.
Quote:
7. You should not specify 127.0.0.1 or localhost as a nameserver in /etc/resolv.conf – use the servers main IP address instead.
Quote:
8. If you have a local DNS server running but do not have any recursion restrictions set in /etc/named.conf this is a security and performance risk and you should look at restricting recursive lookups to the local IP addresses only. Unrestricted recursive lookups are as good as a DDoS attack against your system. They will eat up all your system resources.
Quote:
9. Make sure that OS version is still supported by the manufacturer and that upgrades continue to be available.
Quote:
10. You should disable SSHv1 by editing /etc/ssh/sshd_config and setting: Protocol 2.
Quote:
11. Change SSH default port to avoids basic port scans. Edit /etc/ssh/sshd_config and setting: Port xxxx Where xxxx is a port of your choosing. Don't forget to open the port in the firewall first.
Quote:
12. For ultimate SSH security, you might want to consider disabling PasswordAuthentication and only allow access using PubkeyAuthentication.
Quote:
13. You should enable shell resource limits to prevent shell users from consuming server resources – DOS exploits typically do this. In cPanel/WHM, Enable Shell Fork Bomb Protection to shell resource limit.
Quote:
14. Disable all instances of IRC – BitchX, bnc, eggdrop, generic-sniffers, guardservices, ircd, psyBNC, ptlink. In WHM you can do this from Background Process Killer.
Quote:
15. Check apache for mod_security if not installed install it.
Quote:
16. You should install the mod_evasive apache module from source to help prevent DOS attacks against apache. Note that this module breaks FrontPage functionality.
Quote:
17. You should set a value RLimitCPU to prevent runaway scripts from consuming server resources

Quote:
18. You should set a value RLimitMEM to prevent runaway scripts from consuming server resources.
Quote:
19. You should modify /usr/local/lib/php.ini and set:
enable_dl = off This prevents users from loading php modules that affect everyone on the server.
Quote:
20. You should modify /usr/local/lib/php.ini and disable commonly abused php functions, e.g.:
disable_functions = system, shell_exec, passthru, exec, phpinfo, popen, proc_open, ftp_exec, ftp_connect, ftp_login, ftp_get, ftp_put, ftp_nb_ fput, ftp_raw, ftp_rawlist etc...
Quote:
21. To reduce the risk of hackers accessing all sites on the server from a compromised PHP web script, you should enable phpsuexec when you build apache/php.
__________________
WHUK-Ralf
http://www.webhosting.uk.com
Reply With Quote

  #3 (permalink)  
Old 25-03-11, 04:44 AM
Marketing Team
 
Join Date: Feb 2011
Posts: 373
Default

Hi

I would like to add some more very effective ways of Linux dedicated server security

1. ModSecurity [installing web application firewall]
2. ModEvasive [for preventing DDOS attacks]
3. Fix open DNS recursion
4. Securing PHP
5. Install PostEntry [an effective tool to detect portscans]
6. Check the user uploaded files
7. Secure the /tmp folders
Reply With Quote

  #4 (permalink)  
Old 11-11-11, 04:29 AM
new member
 
Join Date: Nov 2011
Posts: 5
Default

Also set the cron to run chrootkit on regular basis and keep the version of chkrootkit updated.


Reply With Quote

  #5 (permalink)  
Old 10-02-12, 04:20 AM
Junior Member
 
Join Date: Aug 2011
Posts: 14
Default

Here are some linux server security tips:
1. Encrypt Data Communication.
2. Avoid Using FTP, Telnet, And Rlogin / Rsh.
3. Minimize Software to Minimize Vulnerability.
4. One Network Service Per System or VM Instance.
5. Keep Linux Kernel and Software Up to Date.
6. Use Linux Security Extensions.
7. User Accounts and Strong Password Policy.
8. Password Aging.
Reply With Quote

Reply

Thread Tools
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 06:00 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Reseller Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials