summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-23 03:42:02 -0600
committerCraig Jennings <c@cjennings.net>2026-01-23 03:42:02 -0600
commitf482f22512b68e20f5ef1e2c4c848ade7d657183 (patch)
tree94a02bd6836cb00d9fd30fa8144d07de02b92023 /archsetup
parent3ca5c609e1c1ecb5a0b3f265c3592396034e469c (diff)
fix(archsetup): enable ufw firewall with ufw enable command
systemctl start ufw.service only runs ufw-init which checks if ENABLED=yes in /etc/ufw/ufw.conf. Without running 'ufw enable' first, the firewall remains inactive. Added 'ufw --force enable' to actually activate the firewall rules.
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup6
1 files changed, 3 insertions, 3 deletions
diff --git a/archsetup b/archsetup
index 6180b95..4b6b63a 100755
--- a/archsetup
+++ b/archsetup
@@ -890,12 +890,12 @@ EOF
action="rate-limiting SSH to protect from brute force attacks" && display "task" "$action"
(ufw limit 22/tcp >> "$logfile" 2>&1) || error "error" "$action" "$?"
+ action="enabling firewall" && display "task" "$action"
+ ufw --force enable >> "$logfile" 2>&1 || error "error" "$action" "$?"
+
action="enabling firewall service to launch on boot" && display "task" "$action"
systemctl enable ufw.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
- action="starting firewall service" && display "task" "$action"
- systemctl start ufw.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
-
# Verify firewall is actually active
action="verifying firewall is active" && display "task" "$action"
if ufw status | grep -q "Status: active"; then