[SECURITY ADVISORY] Beware of a Phishing Email Campaign Claiming to be from Truehost Cloud
India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Canada English
Canada Français
Somalia English
Netherlands Nederlands

Setting up a Firewall in a Ubuntu Server

Build Something Beautiful

With a .cloud Domain

Just $4.80

  • Home
  • Blog
  • Setting up a Firewall in a Ubuntu Server

Uncomplicated Firewall offers the most basic security configuration for Ubuntu by deafult. Providing a very user friendly firewall for both IPv4 and IPv6.

By default it is loaded in Ubuntu but disabled.

Its configuration is easy and is offered via command line and or a graphiicalinterface for frontend called Gufw.

In this article, well take you through an easy set upand configuration.

Enable UFW

To enable ufw, run this command.

sudo ufw enable

Check the  status by running

sudo ufw status


If the VPS is configured for both IPv4 and IPv6, make sure you configure rules for both. Tho do this, run

sudo nano /etc/default/ufw

and set the value for IPv6 to “YES”

Close the editor by pressing “Ctrl+X” then save the changes.

Restart the firewall by

sudo ufw disable
sudo ufw enable

Set up rules

Setting up some rules to allow and deny rules is easy and simple.

sudo ufw default deny incoming

sudo ufw default allow outgoing

To prevent remote shell connections on a public cloud, you can be more restrictive and deny all outgoing requests. However, this makes the management more cumbersome.

sudo ufw default deny outgoing

Allowing connections

By blocking all incoming requests, SSH was blocked as well and that means you cannot access the server through SSH. You need change the rules to allow SSH to connect.

sudo ufw allow ssh

Author

Read More Posts

the featured image of the ssl/tls certificate and the title mandatory tls

Why UAE Businesses Must Treat TLS as Mandatory in 2025

TLS isn’t just a technical checkbox anymore. For UAE businesses, it’s become a non-negotiable part of doing business…

The google gemini pro graphics and the title uae google partnership

UAE Google Partnership Unlocks Free Gemini Pro: Gateway to AI Learning

What if you could hire a personal tutor who never sleeps, speaks every language, and costs absolutely nothing?…

A laptop with its scren open on domains, a .zip graphic all in the background the truehost logo and title .zip domain phishing

.zip Domain Phishing Attacks Posing A Global Security Threat

.zip domain phishing has emerged as one of the most deceptive cybersecurity threats facing internet users worldwide. These…

A person rubbing off binary code from a white board and the title, is dns flushing safe?

Is It Safe to Flush DNS? A Complete Global Guide

Are you wondering if it’s safe to flush DNS on your computer? You’re not alone in this concern.…

DEAL! DEAL! DEAL! Get .TOP Domain Name @ $1.46REGISTER NOW