Welcome to ciysys blog

Configure firewall

Published on: 22nd Apr 2014

Updated on: 23th Sep 2022

What is firewall

Firewall is a program that manages the incoming and outgoing traffic.

Why we need it

You may need to block the bad website crawler that causes you to pay money for additional bandwidth usage. Or you may want to block someone from brute force attacking your SSH service.

For any web server, we should open the port that is needed and block the remaining ports.

Here's how you configure it

To speed up the firewall setup, best is to rely on ufw (uncomplicated firewall) which is a program that handles the low level configuration in iptables (i.e., the actual firewall).

With iptables

If you want to handle the low level configuration, you will have to use iptables.

NOTE: don't forget to call sudo iptables-persistent save to save the changes.

References

Related posts

Jump to #UBUNTU blog

Author

Lau Hon Wan, software developer.