ufw [--dry-run] [rule] [delete] [insert NUM] allow|deny|reject|limit [in|out [on INTERFACE]] [log|log-all] [proto PROTOCOL] [from ADDRESS [port PORT | app APPNAME ]] [to ADDRESS [port PORT | app APPNAME ]] [comment COMMENT]
ufw allow default outgoing
ufw deny default incoming
ufw allow proto tcp port 20,21,22,80,443,40110:40210 comment 'Web'
ufw allow proto tcp port 25,110,143,465,587,993,995 comment 'Mail'
ufw allow 53 comment 'DNS'
ufw allow proto tcp port 8080,8081 comment 'Panel'
ufw allow in from 78.194.232.180 port 16384:32768 to 152.228.170.112
ufw allow out from 152.228.170.112 to 78.194.232.180 port 16384:32768
ufw deny in from 78.194.232.180 port 0:16383 to 152.228.170.112 port 22
ufw deny in from 78.194.232.180 port 32769:65535 to 152.228.170.112 port 22
ufw deny out from 152.228.170.112 port 22 to 78.194.232.180 port 0:16383
ufw deny out from 152.228.170.112 port 22 to 78.194.232.180 port 32769:65535
#!/usr/bin/bash
ufw --dry-run default allow outgoing
ufw --dry-run default deny incoming
ufw --dry-run allow in proto tcp from 78.194.232.180 port 16384:32768 comment 'Mon_IP'
ufw --dry-run allow out proto tcp from 152.228.170.112 port 22 to 78.194.232.180 port 16384:32768 comment 'Mon_IP'
ufw --dry-run allow in proto tcp to 152.228.170.112 port 20,21,80,443,40110:40210 comment 'Web'
ufw --dry-run allow in proto tcp to 152.228.170.112 port 25,110,143,465,587,993,995 comment 'Mail'
ufw --dry-run allow in to 152.228.170.112 port 53 comment 'DNS'
ufw --dry-run allow out from 152.228.170.112 port 53 comment 'DNS'
ufw --dry-run deny out from 152.228.170.112 port 22 comment 'SSH'
➡️ Offre MyRankingMetrics ⬅️
pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)
Voir les détails ici