Tuesday, December 27, 2011

Using Iptables to JBoss run as non-root.

Configuring an iptables firewall on Ubuntu Hardy Heron server

Introduction

In this article we'll set up a simple firewall on an Ubuntu 8.04 server. The firewall has two purposes:

  1. Block all ports except the few which are used to provide services
  2. Map incoming port 80 to port 8080, so that our Java web servers can run as non-root

And all this must be done on a remote server, so we have to do it in a way that doesn't lock us out.