mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 13:40:17 +00:00
Added ansible rules for ufw
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
- include: packages.yml
|
||||
- include: users.yml
|
||||
- include: apache2-mods.yml
|
||||
- include: ufw.yml
|
||||
|
||||
33
roles/shell/tasks/ufw.yml
Normal file
33
roles/shell/tasks/ufw.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
# Install our baseline packages for all machines, irrespective of what role they might have
|
||||
---
|
||||
- name: Create UFW tcp rules
|
||||
ufw:
|
||||
rule: allow
|
||||
proto: tcp
|
||||
port: '{{ item }}'
|
||||
with_items:
|
||||
- 22
|
||||
- 443
|
||||
- 80
|
||||
- 143
|
||||
- 25
|
||||
- 79
|
||||
- 2222
|
||||
|
||||
- name: Create UFW udp rules
|
||||
ufw:
|
||||
rule: allow
|
||||
proto: udp
|
||||
port: '{{ item }}'
|
||||
with_items:
|
||||
- "60000:61000"
|
||||
- 1326
|
||||
|
||||
- name: Create limits
|
||||
ufw:
|
||||
rule: limit
|
||||
proto: tcp
|
||||
port: '{{ item }}'
|
||||
with_items:
|
||||
- 22
|
||||
- 2222
|
||||
Reference in New Issue
Block a user