I am hoping this is an easy fix. I have EasyPHP installed, which is a wrapper application for Apache, PHP, and MySql (for the benifit of anybody who may not be aware) on my main computer (running W98), then I do most of my coding while kicked back on my recliner pounding on my laptop which is hooked up to the PC via peer-peer wireless. It works fine for me. If I need to run an application or reboot something on the main PC I just send a browser over there and take over via TightVnc. No muss, no fuss, or so I thought.
Just for grins, I checked the Apache error log and was struck by an unusual IP address. Since the error log was HUGE (EasyPHP does have a couple minor bugs on my system) I slapped a script together to parse out the IP's that do not match my LAN, used it to view the access log, and was amazed to find DOZENS of hostile IP addresses, one IP family was rather persistent having made several hundred attempts over the last few days. The requests I recognized as commands used to exploit known vulnerabilities for various servers, but they all had the paths wrong.
I don't think my system was penetrated, all the requests resulted in 404 or 400 codes. I also do not think it was directed at me. If someone was after me they probably would have sent a browser to my IP, saw the default EasyPHP page, and could have figured out the right path at least. I think it was script kiddies out of control who probably would not have known what to do if the script they got from their friendly hacker in the chatroom (oh, yea, a few AOL ip's were in there too) ever found a vulnerability.
I do need to fix this, though. And just insuring my server is has no vulnerabilities is not enough. I am on a PHONE modem, I don't have the BANDWIDTH to return all those 404 pages, or even deny them! I want to isolate Apache (and MySql for that matter) from the internet when I am online. Right now I have the server turned off, which works pretty good for security but kind of sucks when I am coding and need to hop online and do a search.
I considered a partial solution of assigning alternative ports, but I still have some un-needed exposure that way (I also like just typing 'home' into my laptop browser to view my root and my HOSTS file does not seem to work if I try to assign ports). I tried disallowing Apache and MySql access to the internet via ZoneAlarm but that killed the LAN too as far as the web service. A rules based firewall might be an option but it seems a lot of trouble to go through for a phone modem and I just wanna write PHP all the time!
I am hoping there is a way I can configure Apache and MySql to only allow the LAN? I don't want Apache returning errors (except to me, cuz I'm the daddy), I want their respective ports closed to the outside world. Any help out there? Thanx!