Setting up a basic, minimalist firewall on your server is easy with ufw (the "uncomplicated firewall"). The example here is for Ubuntu 9.04 Jaunty, but apart from the install should be...