it does.
Ubuntu has a firewall called UFW. By default its a command line utility, but there is a gui available -
sudo apt-get install gufw
Once this is installed it can be configured from System ->Administration ->Firewall Configuration.
It should be noted that if your running on a home network behind a router, you router will already be taking care of your firewall concerns.
As a general rule, it is best to only run one firewall at once, so consider switching off your Ubuntu firewall whilst running on your home network.