/ansible-ufw

Ansible Role - Install Uncomplicated Firewall and configure rules.

MIT LicenseMIT

UFW

Install Uncomplicated Firewall and configure rules.

1   Features

  • Default policy to deny all incoming connections (except SSH port).

2   Requirements

  • Debian

3   Role Vars

3.1   ufw_rules

A list of UFW rules. Each rule's parameters are passed to the ufw module as-is.

4   Example

ufw_rules:
  - comment: "Expose http port."
    rule: "allow"
    port: 80
    direction: "in"
    from: "any"
    proto: "tcp"
  - comment: "Expose https port."
    rule: "allow"
    port: 443
    direction: "in"
    from: "any"
    proto: "tcp"