diff options
| author | root | 2022-11-09 13:27:04 +0000 |
|---|---|---|
| committer | root | 2022-11-09 13:27:04 +0000 |
| commit | 8b304d501d052262dd6b725b9f84d7e634c67e9f (patch) | |
| tree | 459a5e5f300bd848eb181c249539a04a90fb7fe3 | |
| download | ufw rules-8b304d501d052262dd6b725b9f84d7e634c67e9f.tar.gz | |
ufw rules
| -rwxr-xr-x | ufw.sh | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +#!/bin/bash + +main() { + ufw --force reset + + + #ufw default allow incoming + ufw default deny incoming on enp2s0 + ufw default allow outgoing + ufw allow in on virbr0 + #ufw allow in on enp2s0 from 95.91.211.71 + + ufw allow in on enp2s0 to any port 22 + + # nginx + ufw allow in on enp2s0 to any port 80 + ufw allow in on enp2s0 to any port 443 + + # dovecot + ufw allow in on enp2s0 to any port 143 + ufw allow in on enp2s0 to any port 993 + ufw allow in on enp2s0 to any port 4190 + ufw allow in on enp2s0 to any port 12302 + + # postfix + ufw allow in on enp2s0 to any port 25 + ufw allow in on enp2s0 to any port 465 + ufw allow in on enp2s0 to any port 587 +} + +main |
