first commit
This commit is contained in:
commit
a8b2cd4853
29
firewall.yml
Normal file
29
firewall.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Firewall with ufw
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Install Basic Packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- ufw
|
||||||
|
update_cache: no
|
||||||
|
install_recommends: no
|
||||||
|
|
||||||
|
- name: Allow all access to tcp port 22 (ssh)
|
||||||
|
community.general.ufw:
|
||||||
|
rule: deny
|
||||||
|
port: '22'
|
||||||
|
proto: tcp
|
||||||
|
|
||||||
|
- name: Allow all access to tcp port 33 (ssh)
|
||||||
|
community.general.ufw:
|
||||||
|
rule: allow
|
||||||
|
port: '33'
|
||||||
|
proto: tcp
|
||||||
|
|
||||||
|
- name: Deny everything per policy and enable UFW
|
||||||
|
community.general.ufw:
|
||||||
|
state: enabled
|
||||||
|
policy: deny
|
||||||
|
|
Loading…
Reference in New Issue
Block a user