Securing a linux webserver for public access

By : karlgrz
Source: Stackoverflow.com
Question!

I'd like to set up a cheap Linux box as a web server to host a variety of web technologies (PHP & Java EE come to mind, but I'd like to experiment with Ruby or Python in the future as well).

I'm fairly versed in setting up Tomcat to run on Linux for serving up Java EE applications, but I'd like to be able to open this server up, even just so I can create some tools I can use while I am working in the office. All the experience I've had with configuring Java EE sites has all been for intranet applications where we were told not to focus on securing the pages for external users.

What is your advice on setting up a personal Linux web server in a secure enough way to open it up for external traffic?

By : karlgrz


Answers

@svrist mentioned EC2. EC2 provides an API for opening and closing ports remotely. This way, you can keep your box running. If you need to give a demo from a coffee shop or a client's office, you can grab your IP and add it to the ACL.



Bit-Tech.Net ran a couple of articles on how to setup a home server using linux. Here are the links:

Article 1
Article 2

Hope those are of some help.

By : Pondidum


If you're going to do this, spend a bit of money and at the least buy a dedicated router/firewall with a separate DMZ port. You'll want to firewall off your internal network from your server so that when (not if!) your web server is compromised, your internal network isn't immediately vulnerable as well.



This video can help you solving your question :)
By: admin