Jump to content

LAMP security


andrewholway

Recommended Posts

Hi,

Having lost my girlfreind I have recently got lamp up and running in my bedroom(wehay). I have been playing for the past couple of weeks and have been really enjoying myself making my little php programs. A dark cloud is looming, counjered by a freind in the pub
"What is your security like". I stared at him agast.
"Linux is bombproof" I intoned.
"Yes" he replied "But I bet your code bloody well isnt!".

How do I test for this? I want to start bringing some actual sites online with forums and the suchlike soon but the fear has gripped me!

Cheers,

Andy
Link to comment
Share on other sites

  • 2 weeks later...
If your server is set up well then your security will not be a problem!  Linux is fairly 'bomb proof' as you put it, but only if you have it set up so!  A good place to start would be the fire-wall.  Try google for iptables.  Also try restricting down you ssh logins in the sshd config.  Complex root passwords also help.

As to security of php scripts this realy depend how you write them.  If you have them running under root, and storing important passwords on them then this can be a problem!
If your scripts are running under Apache (most likly) then they can only do what apache can do. If you realy wish to restrict this you need to play around with the directory tags in the httpd.conf file. 

Dont forget that no one can reed your php scripts unless they can log into your server.  The chance of a security problem from a php script is low.  (if your talking about the security of members areas and things, this is a difrent isue, and you should ask in the php area.)  Chances are the dark cloud is not neccecery!

Link to comment
Share on other sites

You need to disable all apache modules you dont use. If you dont need php - dont use it.
If you do use php etc. you can limit its use to a specific virtual host.

There are various hardening tricks for apache. Apache can be run in a chroot jail. There is a hardened version of PHP also. There is suPHP also. A google for "hardening apache" should get some good tips.

-steve
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.