With the firewall? By default, UFW will block everything inbound, and allow everything outbound. As you already know you can use GUFW to customize it. (GUFW is just a GUI front-end for UFW)
All ports are closed unless you're running a program that's opening them, in which case, it probably needs them. You can use UFW at stated above to create stricter rules.