Ir para conteúdo
  • Cadastre-se

Servidor Mais Seguro.


Tiago Matos

Posts Recomendados

Olá Pessoal,

Logo que iniciei os serviços de hospedagem de site, a LSN me ofereceu um pacote de servidor seguro. Como na época eu era muito iniciante, paguei por isso.

Hoje, me veio a mente para rever o que foi feito no servidor. Então, solicitei a lista de tarefas que foi realizada.

Meu intuito é fazer com que criemos um how to de como deixar o servidor mais seguro baseado nesta lista e nos conhecimentos dos admins aqui do forum.

Alguns itens são veio vago como "Configuração do IPTables", qual configuração, onde, como? hehe...mas com a ajuda de todos deve-se chegar a um denominador comum.


1) Disable the compiler (Many common exploits require a working C compiler on the system. This tweak allows you to deny compiler access to unprivileged users; you can also choose to allow some users to use the compilers while they remain disabled by default.)


2) Change the SSH port number.


3) Configure DDOS deflate to prevent DDOS attack.


4) Configure the CSF firewall.


5) Enable Shell Fork Bomb Protection (Fork Bomb Protection will prevent users with terminal access (ssh/telnet) from using up all the resources on the server. Unchecked resource allocation can potentially lead to a server crash.)


6) Configure iptables rules to prevent SYN Attack.


7) Boxtrapper is disabled.(WARNING: Having boxtrapper enabled can very easily lead to your server being listed in common RBLs and usually has the effect of increasing the overall spam load, not reducing it)


8) The Temporary directory has to be secured. (need to reboot the server once).


9) Disable traceroute.


10) Check max emails per hour is set (WARNING: To limit the damage that can be caused by potential spammers on the server you should set a value for WHM > Tweak Settings > The maximum each domain can send out per hour)


11) Disable the Anonymous FTP Logins, Allow Anonymous Uploads, Allow Logins with Root Password


12) Run the cPanel script upcp and fixeverything.


13) PHP is the most popular scripting language for apache and mysql. You will need to disable system level functions in the php configuration file.


14) Stop and disable the following services at startup: cups, xfs, atd, nfslock, canna, FreeWnn, cups-config-daemon, iiim, mDNSResponder, nifd, rpcidmapd, bluetooth, anacron, gpm, saslauthd, avahi-daemon, avahi-dnsconfd, hidd, pcscd and sbadm.


15) Apache Configuration tweak: TraceEnable to Off ServerSignature to Off ServerTokens to ProductOnly set FileETag to None


16) Blank referrer safety to be enabled - Only permit cpanel/whm/webmail to execute functions when the browser provides a referrer. This will help prevent XSRF attacks but may break integration with other systems, login applications, and billing software. Cookies are required with this option enabled.


17) Referrer safety to be enabled - Only permit cpanel/whm/webmail to execute functions when the browser provided referrer (Domain/IP and Port) exactly matches the destination URL. This will help prevent XSRF attacks but may break integration with other systems, login applications, and billing software. Cookies are required with this option enabled.


18) Enable the extended exim logging for the easier tracking potential outgoing spam issues.


19) Tweak mod_userdir Protection (Apache's mod_userdir allows users to view their sites by entering a tilde(~) and their username as the uri on a specific host. For example http://test.cpanel.net/~fred/ will bring up the user fred's domain. The disadvantage of this feature is that any bandwidth usage used by this site will be put on the domain it is accessed under (in this case test.cpanel.net). mod_userdir protection prevents this from happening. You may however want to disable it on specific virtual hosts (generally shared ssl hosts.)


20) PHP open_basedir Protection (PHP's open_basedir protection prevents users from opening files outside of their home directory with php. This security tweak uses Apache DSO style directives. If PHP is configured to run as a CGI, SuPHP or FastCGI process, the open_basedir setting must be manually specified in the relevant php.ini file)


21) Disable the shell access to the unwanted users.


22) Rebuild the easy apache with the mod_security and Suhosin


23) The cPanel passwords are sending out in plain text emails, when creating a new account. To disable WHM > Tweak Settings > Send passwords when creating a new account

24) Enable SpamAssassin spam filter and Enable SpamAssassin Spam Box delivery for messages marked as spam (user configurable).

Link para o comentário
Compartilhar em outros sites

Rapaz legal a iniciativa, mas muita coisa ai nessa lista já é feito caso contrário não funciona nada hehe.

Outras são itens de segurança.

Mas sinceramente já faço tudo isso por segurança e mais alguns, como configurar o mod_security com algumas regras especificas, rebuild do apache com alguns módulos mais especificos, adição da porta do novo protocolo de e-mails, bloquios de extensões e funcções, shell_exec etc.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...

Informação Importante

Concorda com os nossos termos?