Skip to content

Ansible role to set up ufw in Debian-like systems

License

Notifications You must be signed in to change notification settings

je-al/ansible-ufw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ufw

Build Status Ansible Galaxy

Set up ufw in Debian-like systems.

Requirements

None

Variables

  • ufw_default_policy [default: deny]: Default policy
  • ufw_logging [default: off]: Log level
  • ufw_rules [default: see defaults/main.yml]: Rules to apply

Dependencies

None

Example

---
- hosts: all
  roles:
    - ufw
Allow ssh
- hosts: all
  roles:
    - ufw
  vars:
    ufw_rules:
      - rule: allow
        to_port: 22
        protocol: tcp
Allow all traffic on eth1
- hosts: all
  roles:
    - ufw
  vars:
    ufw_rules:
      - rule: allow
        interface: eth1
        to_port: ''
Allow snmp traffic from 1.2.3.4 on eth0
- hosts: all
  roles:
    - ufw
  vars:
    ufw_rules:
      - rule: allow
        interface: eth0
        from_ip: 1.2.3.4
        to_port: 161
        protocol: udp

TODO

Make use of omit, available in ansible 1.8

License

MIT

Author Information

Mischa ter Smitten (based on work of weareinteractive)

Feedback, bug-reports, requests, ...

Are welcome!

About

Ansible role to set up ufw in Debian-like systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published