|
I take care of servers (i.e. computer clusters, web page server, web service server, etc.). Apparently, for all my passed jobs, I need some sort of servers. I've taken care a 16-node (Dell running Rocks) cluster for stressing networked storages, web server and now again a web server too. Being an administrator for a web server (not sure how a IT guy takes it), you get a bit paranoid when you check the logs of your servers. Having the server outside the firewall, you get all sorts of logs, from the common SSH bruteforce attack, to Apache mysql, php addon attacks. It looks like it is matter of time before holes are found.
Currently, my web service is essentially my work machine. It is a mac. Whilst the university has a compus firewall, my mac needs to be sitting outside the firewall due to the various web service that I need to run my genome computation on. Further, as I have my programs running overnight and over the weekend, I need to able to remote login into my mac and check on the status and restart the program is things happened. In conclusion, I can't just firewall the whole mac.
Of the little things that I do on the server that I administer, is to change the SSH port. For my low users (less than 3) server, taking care of the SSH service is pretty easy as I'll do not have to worry about easy to guess username and weak password. However, bruteforce attack on the port 22 does make the log lengthy and may distracts/annoys you until you missed the important stuff. Hence, to avoid hobbist SSH brute-forcing, I change my port to other port. This solve some of the issue.
Amongst the services that make me paranoid are those services (open ports) that I'm not aware and those that my own add-on scripts on apache. For the apache script issue, I'm rather confident as for all my scripts that I installed and webpages that I'm hosting, I put it under my username directory, which is difficult to guess. And the location of the scripts are not in the common place. As such, even if there is an exploitable bug in any of the scripts that I use, chances are, they won't be able to find it on a brute-force scan. Still, I don't like the fact that my apache log is filled with bruteforce attacks. I tried the standard intrusion detection system (IDS) software, snort, which I know nothing about, and hope that it's webserver plugin will solve my apache bruteforce attacks, magically some how. Other than the fact that snort is a pain to install and to use, and also the fact that it doesn't do what I hope it will do, all snort does is make me more paranoid with new alert on top of all the brute force attacks I'm already getting from my apache. Paranoid attack!
I have also did a nmap on my own mac and supprisingly, there are a lot of open port. This ranges from my mysql, iTunes, CUPS (for printers), to some unknown 50001 port. Surprisingly, these ports are accessible from the internet too! That makes me paranoid. Whilst Mac has a good reputation of being solid. I'm not taking any chances. My first thought is to patch the ports with the built-in firewall. Being an ultra user friendly firewall, Mac Leopard firewall is no help for paranoid person like me in patching up ports. Then, I look at the under utilized ipfw that comes with a mac. I did some research on it and found that it is quite user (or rather admin) friendly, and decide to start a weekend project on writing a Java (yes, I'm a Java person) program that will be triggered by snort alert, and apache logs. This program will then identify the culprit ip and block it using ipfw. To avoid overflowing the ipfw table, I'll (i.e. the Java program) have a log (again!) on the blocked ip, in order to schedule the remove blocked ips after fix time interval. This should keep some hobbiest brute-forcer at bay. I've tested the concept (it works!) and prepared to start the weekend project, then, my friend (a techy person with a pet bull, which we refer as cow) suggested to me of running a virtual machine (VM) to take the hit (if security is breached). Initially, I was a bit skeptical about the idea (i.e. slow performance, and expensive software?) but later, it turned out to be perfect!
Tutorial on how to secure your Mac Leopard with VM and ipfw.
|