The level of security you need for your Raspberry Pi will strongly depend on how you plan to use it. In this easy-to-follow tutorial we’re going to show you how to install and manage UFW (Uncomplicated Firewall) on Raspberry Pi.
Source: LXer – Raspberry Pi Firewall: How to Install and Manage it by Using UFW