In Ubuntu the firewall is always enabled, it is not a service - it is a kernel feature, enabled during compilation. But besides enabled firewall you need to write some rules for it and execute them after each reboot, for example as network interface startup script. Programming rules is simple, for example:
Code:
iptables -P INPUT DENY # By default do not allow to anybody to start connection with your machine
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT # By default allow you connecting to anywhere from your machine
iptables -A INPUT -p TCP --dport 80 -j ACCEPT # Allow anybody to connect to your machine on port 80
This is only example, you can also find some high level tools to administer iptable rules.