f500.ufw

UFW

Install UFW (Uncomplicated Firewall) and manage rules.

Requirements

You need Debian Bullseye / Bookworm, along with the python-pycurl and python-software-properties packages.

Role Variables

Set the default rule:

ufw_default_policy:
  - { direction: "incoming", policy: "deny" }

Add or delete rules:

ufw_rules_to_create: []
ufw_rules_to_delete: []

Both ufw_rules_to_create and ufw_rules_to_delete take a list of rules. For example:

ufw_rules_to_create:
  - direction: in
    from_ip: 1.2.3.4
    from_port: 5678
    interface: eth0
    proto: tcp
    rule: allow
    to_ip: 5.6.7.8
    to_port: 1234

Example Playbook

- hosts: servers
  roles:
     - role: f500.ufw
       ufw_rules_to_create:
         - { to_port: 22 }
         - { to_port: 80 }
         - { to_port: 443 }

License

Copyright (C) 2017 Future500 B.V.

LGPL-3.0

Author Information

Jasper N. Brouwer, jasper@future500.nl

Ramon de la Fuente, ramon@future500.nl

Informazioni sul progetto

Install UWF (Uncomplicated Firewall)

Installa
ansible-galaxy install f500.ufw
Licenza
lgpl-3.0
Download
11.9k
Proprietario
Open source contributions by Future500