---

Set up a Firewall with UFW on Ubuntu

If you have an Ubuntu server and you like to control the incoming and outgoing network traffic you need to configure the firewall that is included with your system. Linux kernel includes the netfilter subsystem which is a system for packet filtering. The traditional interface for manipulating netfilter is via iptables, which is primarily a database of firewall rules. The Uncomplicated Firewall or ufw is a frontend for iptables and it makes the iptables firewall configuration and blocking IP addresses much easier. In this guide, we will show you how to set up a firewall using UFW on a Linux VPS running Ubuntu 16.04 as an operating system. Before you start, you should make sure that ufw is installed and running on your server. If not, you can use the apt package manager to install it.