Member-only story

Open firewall ports in Debian like systems — Ansible module ufw

How to open firewall HTTP and HTTPS ports in Debian-like systems using Ansible and ufw, the Uncomplicated Firewall. I’m going to show you a live demo and some simple Ansible code.

Luca Berton
4 min readSep 9, 2021

How to open firewall ports in Debian-like systems with Ansible?

I’m going to show you a live demo and some simple Ansible code.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

Ansible open firewall ports in Debian-like systems

Today we’re talking about the Ansible module UFW.

The full name is `community.general.ufw`, which means that is part of the collection supported by the Ansible community. This module requires Ansible 2.9+.

It works in Debian-like systems so distributions like Debian, Ubuntu, and Mint with `ufw` firewall, the Uncomplicated Firewall.

This module manages the firewall with UFW.

Parameters

  • default string (policy) — allow / deny / reject

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet