Skip to content

Instantly share code, notes, and snippets.

@NetguruGist
Created February 14, 2017 10:07
Show Gist options
  • Save NetguruGist/d5ff7e301817202cc6f8617668547d25 to your computer and use it in GitHub Desktop.
Save NetguruGist/d5ff7e301817202cc6f8617668547d25 to your computer and use it in GitHub Desktop.
- name: "Setting up a firewall"
action: lineinfile dest=/etc/default/ufw regexp="^IPV6" line="IPV6=yes" state=present
- ufw: rule=allow port={% raw %}{{ item }}{% endraw %} proto=tcp
with_items:
- 22
- 80
- 443
- ufw: state=enabled policy=deny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment