added ufw
This commit is contained in:
Vendored
+10
@@ -50,6 +50,16 @@
|
|||||||
"panel": "dedicated"
|
"panel": "dedicated"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Deploy: ufw",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "make deploy-ufw",
|
||||||
|
"group": "build",
|
||||||
|
"presentation": {
|
||||||
|
"reveal": "always",
|
||||||
|
"panel": "dedicated"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Build & Push: postfix",
|
"label": "Build & Push: postfix",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
- name: Nginx
|
||||||
|
hosts: pi
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: Install ufw
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: ufw
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Allow SSH
|
||||||
|
community.general.ufw:
|
||||||
|
rule: allow
|
||||||
|
name: OpenSSH
|
||||||
|
|
||||||
|
- name: UFW - Allow HTTP connections
|
||||||
|
community.general.ufw:
|
||||||
|
rule: allow
|
||||||
|
port: "80"
|
||||||
|
proto: tcp
|
||||||
|
|
||||||
|
- name: UFW - Allow HTTPS connections
|
||||||
|
community.general.ufw:
|
||||||
|
rule: allow
|
||||||
|
port: "443"
|
||||||
|
proto: tcp
|
||||||
|
|
||||||
|
- name: UFW - Enable and deny by default
|
||||||
|
community.general.ufw:
|
||||||
|
state: enabled
|
||||||
|
default: deny
|
||||||
|
|
||||||
|
- name: UFW - Reload firewall
|
||||||
|
changed_when: true
|
||||||
|
ansible.builtin.command: ufw reload
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
collections:
|
||||||
|
- name: community.general
|
||||||
Reference in New Issue
Block a user