2024-04-20 17:08:39 +02:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "install ufw",
|
|
|
|
"become": true,
|
|
|
|
"ansible.builtin.apt": {
|
|
|
|
"update_cache": true,
|
|
|
|
"pkg": [
|
|
|
|
"ufw"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "ufw deny incoming",
|
2024-06-01 13:49:11 +02:00
|
|
|
"become": true,
|
|
|
|
"community.general.ufw": {
|
2024-04-20 17:08:39 +02:00
|
|
|
"direction": "incoming",
|
|
|
|
"proto": "any",
|
|
|
|
"policy": "deny"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "ufw allow outgoing",
|
2024-06-01 13:49:11 +02:00
|
|
|
"become": true,
|
|
|
|
"community.general.ufw": {
|
2024-04-20 17:08:39 +02:00
|
|
|
"direction": "outgoing",
|
|
|
|
"proto": "any",
|
|
|
|
"policy": "allow"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "ufw allow and rate-limit ssh",
|
2024-06-01 13:49:11 +02:00
|
|
|
"become": true,
|
|
|
|
"community.general.ufw": {
|
2024-04-20 17:08:39 +02:00
|
|
|
"rule": "limit",
|
|
|
|
"name": "ssh"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "enable ufw service",
|
2024-06-01 13:49:11 +02:00
|
|
|
"become": true,
|
|
|
|
"community.general.ufw": {
|
2024-04-20 17:08:39 +02:00
|
|
|
"state": "enabled"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|