how to secure my server ?

Discussion in 'Security' started by joyfun4u, Feb 2, 2008.

  1. #1
    i have dedicate server any tell me how to secure ?
     
    joyfun4u, Feb 2, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Make sure all system packages are updated. Shut off all unnecessary services and make sure the ones you leave running are properly configured. If you can, remove any web admin tools and stick to using SSH with a reasonably lengthy key or very good passwords.

    Disable direct root login. Configure access for SSH, and any other critical service, and restrict it by username and IP address.

    Whenever possible, configure your services to run as non-privileged users and use non-privileged logins for accessing the DB etc. Check all your applications for potential security holes and make sure everything is secure in that area.

    Finally, have a good firewall as the first line of defence.

    This is just a summary and there's lots more you can and should do.
     
    boltok, Feb 4, 2008 IP
    Pathan likes this.
  3. norbert

    norbert Guest

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here are some more tips for a Linux server with increasing complexity:

    -Subscribe to all security mailinglists of all applications you run on the system
    -Keep your system up-to-date
    -Avoid default configuration like domain.xyz/phpmyadmin
    -Control all logs on a regular basis

    -Disable all unneeded services
    -Run rkhunter and chkrootkit every once in a while
    -Use a safe php.ini, PHPsuexec and suhosin
    -Use denyhosts to block SSH attacks
    -Disable SSH login, use public key authentication instead
    -Use AIDE to check the integrity of important system binaries
    -If possible compile everything needed into the kernel and disable loading of modules
    -Use mod_security (web application firewall)
    -Use ACLs (access control lists)
    -Monitor the server with Nagios and Cacti
    -Configure iptables
    -Use SNORT to detect/prevent intrusions
    -USE GRsecurity for kernel level security
    -Use SELinux
     
    norbert, Feb 4, 2008 IP
  4. joyfun4u

    joyfun4u Banned

    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ConfigServer Security & Firewall - csf v3.06 & modesecurity

    i use this

    this is good ?
     
    joyfun4u, Feb 5, 2008 IP
  5. joyfun4u

    joyfun4u Banned

    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sorry sir im new in this field. i dont know about this sir
    im use ConfigServer Security & Firewall - csf v3.06 & modesecurity it is good ?
     
    joyfun4u, Feb 5, 2008 IP
  6. norbert

    norbert Guest

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have no experience yet with ConfigServer, but the feature list looks really good, wow, I didn't know this.
    And it works together with mod_security, has IDS functionality.
    Instead of installing additional software I would
    recommend to first study the documentation of this package and its logs as well as possible to get most out of it.
    If you run PHP you should use a safe php.ini. rkhunter and chkrootkit are programms you can just run from the command line
    to check for rootkits. All other measures need more or less deep knowledge, so there is no way around google and docu.
     
    norbert, Feb 5, 2008 IP
  7. joyfun4u

    joyfun4u Banned

    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    register_globals = Off
    allow_url_fopen = Off
    display_errors = Off
    open_basedir = [path to the directory of the web server / virtual host]
    safe_mode = On

    All Done Thanks
     
    joyfun4u, Feb 7, 2008 IP
  8. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #8
    The 4 most important things to do is:

    -> Install APF firewall by blocking unwanted ports
    -> Change SSH port and use key authentication
    -> If you run DNS make sure DNS is not open (check with dnsstuff.com)
    -> Install rkhunter

    i had recently a bot doing lot of attacks on port 22 (ssh), so make sure you monitor logs in /var/log/secure

    if you dont know which ports are open use this command. You can see important linux commands here

    ->
     
    olddocks, Feb 8, 2008 IP
  9. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #9
    hi,

    We have coined all the steps required to secure the servers at a single page.
    Here comes the steps that we usually take for the first level securing of the servers.
    maestriatech.com/instruction.php
     
    maestria, Feb 29, 2008 IP
    olddocks likes this.
  10. zedomax

    zedomax Peon

    Messages:
    212
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    zedomax, Mar 1, 2008 IP
  11. megadl

    megadl Peon

    Messages:
    355
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    megadl, Mar 1, 2008 IP
  12. cooldude7273

    cooldude7273 Active Member

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #12
    cooldude7273, Mar 2, 2008 IP
  13. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #13
    great resource +rep :D
     
    olddocks, Mar 16, 2008 IP
  14. monster.amd64

    monster.amd64 Peon

    Messages:
    485
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    nice informations .. thanks :D
     
    monster.amd64, Mar 19, 2008 IP
  15. recursive

    recursive Peon

    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Might be a good idea to remove password authentication and use certificates instead.
    (will not help against attacks on the ssh daemon itself)
     
    recursive, Mar 19, 2008 IP
  16. NICKY Nitro

    NICKY Nitro Well-Known Member

    Messages:
    958
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    138
    #16
    the best solution to protect one's server is to use a ddos protection/mitigation service, only that way you can be secured from major scale attacks and prevent any downtime.
     
    NICKY Nitro, Mar 31, 2008 IP
  17. the_wanderer

    the_wanderer Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    This is a big question and depends a great deal on what you are hosting on your dedicated server.

    If you are running a large scale site or gambling site then you may need to consider enhanced security measures from your hosting company such as ddos protection.

    However if you are running any thing up to a mid sized server there is 2 things you can do that will go long way in stopping the most common attacks.

    1. Use strong passwords on all your ssh accsessible accounts.
    2. Keep all software up to date. This includes Operating System, Applications and any web scripts you are running. Things like wordpress or phpbb etc.

    These are the two most common attack vectors from my experience and if you follow those two rules you will be a long way ahead of many dedicated / vps server owners.

    Now if you want to go further there is much to be learnt from google - read up on guides on securing your web server / operating system and follow the links. Read and Learn.

    Running a Nessus Scan against your server is also a great way to get a view of any obvious security vulnerabilities.
     
    the_wanderer, Mar 31, 2008 IP
  18. Yankee85

    Yankee85 Peon

    Messages:
    1,067
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
  19. elizalde

    elizalde Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Thanks for mates!!!...
     
    elizalde, May 13, 2008 IP
  20. Robert25

    Robert25 Peon

    Messages:
    939
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Actually I had purchased linux dedicated server from http://www.eurekawebhosting.com and ask them for some tips for data server security but found one nice here.

    Thanks :)
     
    Robert25, Jun 19, 2008 IP