Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed EasyPHP, which is basically a combination of Apache, PHP and MySQL for dummies. I'd like to make my router forward incoming requests to my computer, so that everyone on the Internet could fetch data from my computer using the Apache server.

However, I was wondering if there are many risks in this. For example:

  • Could someone get full control of my computer this way?
  • Is my computer more exposed to secutiry risks?
  • Could I (practically) get DDOSed?

The last question might be exaggerating, but I'm just curious.

Thanks.

share|improve this question

migrated from webmasters.stackexchange.com Jan 28 '11 at 13:03

This question came from our site for pro webmasters.

add comment

2 Answers 2

up vote 2 down vote accepted

Exposing your computer to the internet always has risks of some sort, in this case there's some extra risk, but most of it can be avoided if you're sensible enough about it.

  • Could someone get full control of your computer? Highly unlikely, I wouldn't say never, but... the risk is minimal

  • Is my computer more exposed? Yes it is, although if you follow some reasonable guidelines you can reduce that risk a lot

    • Any code that you want to run and it's in development, make sure it's protected by htpassword so nobody can get to it knowing the auth credentials
    • For anything else keep track of your logs, also it's good to make sure you run apache as its own user so it doesn't try to mess with your user files (or have administration rights)
  • Could you get DDOSed? Hm you can get that anytime, attacking your router is the easiest so exposing a web server to the world doesn't really multiply the risk factor

share|improve this answer
    
This seriously plays down the risks. And the potential impact of these risks. jscott's suggestion of using a hosted solution is far more sensible. –  symcbean Jan 28 '11 at 15:43
    
"seriously plays down the risks"? I think I've been as accurate as possible with the risks, and tried to answer exactly what he was asking for –  lynxman Jan 28 '11 at 15:47
add comment

By opening incoming ports through your router, you are allowing traffic a path to your computer. As everyone states already, these are all possibilities but you need to just be smart about it. Only forward ports you need(80) and make sure you have a recent version of apache.

Considering how widespread apache/php are, I would have a hard time thinking someone with an exploit would be targeting you when there are much more lucrative targets. This may be why I don't work in IT security though =P

Just keep an eye on your logs, you would be surprised how many random bots you will have flooding your server with attempted overflow attacks. Maybe not a risk, but surely annoying and puts heavier load on your bandwidth/system resources. You can ban these risky ip blocks once you see any problems.

It's nice having a local server though, so have fun

share|improve this answer
    
I see it's not all peaceful, but I'll have a go. If I just give my IP to a friend, is it likely that all sorts of bots also start attacking my computer? If I hold at peace about my IP, I don't think bots will know it, do they? –  pimvdb Jan 28 '11 at 16:23
    
Those bots are probably already making attempts, as they just scan ranges of IP's for open ports automatically. You will just get the connection now that the port is open. I wouldn't really worry about them, but take a look at your logs and ban any IP ranges that seem to be troublemakers if any. –  David Houde Feb 1 '11 at 17:40
    
Again, I wouldn't worry. Apache is the most common web server in the world. It would be foolish to say that makes you safe, but you are taking very little risk, not enough to worry about. Just my opinion though. –  David Houde Feb 1 '11 at 17:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.