![]() |
|
|
|
|
|||||||
| Dedicated Servers Need help choosing which dedicated server that works best with your site(s)? Feel free to talk about them here! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 Code:
chkconfig telnet off |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
Secure PHP. Set restriction on system level functions in the php configuration file. Edit php.ini file:
Code:
vi /usr/local/lib/php.ini Code:
register_globals = Off disable_functions = exec,system,shell_exec,passthru expose_php = Off magic_quotes_gpc = On |
|
#5
|
||||
|
||||
|
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. Code:
Name: clamavconnector Author: cPanel Inc. Best Regards |
|
#6
|
||||
|
||||
|
Quote:
__________________
Best, Shazam HostICan Community Superhero |
|
#7
|
||||
|
||||
|
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.
|
|
#8
|
|||
|
|||
|
Login through ssh and edit your host.conf file.
Code:
nano /etc/host.conf Code:
order hosts,bind Code:
nospoof on |
|
#9
|
|||
|
|||
|
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 Code:
rkhunter -c Code:
tar zxf portsentry-current.version.tar.gz make linux make install Code:
/usr/local/psionic/portsentry/portsentry -stcp /usr/local/psionic/portsentry/portsentry -sudp |
|
#10
|
||||
|
||||
|
Quote:
Quote:
. . |
![]() |
| Tags |
| secure, servers |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|