summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2022-11-09 13:27:04 +0000
committerroot2022-11-09 13:27:04 +0000
commit8b304d501d052262dd6b725b9f84d7e634c67e9f (patch)
tree459a5e5f300bd848eb181c249539a04a90fb7fe3
downloadufw rules-8b304d501d052262dd6b725b9f84d7e634c67e9f.tar.gz
ufw rules
-rwxr-xr-xufw.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/ufw.sh b/ufw.sh
new file mode 100755
index 0000000..d08acc2
--- /dev/null
+++ b/ufw.sh
@@ -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