progress snapshot
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# This script configures strict firewall with WireGuard-only access
|
||||
# Implements CIS Debian Benchmark and CMMC/FedRAMP controls
|
||||
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
echo "Applying CIS Benchmark and CMMC/FedRAMP hardening..."
|
||||
|
||||
@@ -48,8 +48,8 @@ iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A OUTPUT -o lo -j ACCEPT
|
||||
|
||||
# Only WireGuard on physical interface
|
||||
iptables -A OUTPUT -o eth0 -d $WG_ENDPOINT_IP -p udp --dport $WG_ENDPOINT_PORT -m state --state NEW,ESTABLISHED -j ACCEPT
|
||||
iptables -A INPUT -i eth0 -s $WG_ENDPOINT_IP -p udp --sport $WG_ENDPOINT_PORT -m state --state ESTABLISHED -j ACCEPT
|
||||
iptables -A OUTPUT -o eth0 -d "$WG_ENDPOINT_IP" -p udp --dport "$WG_ENDPOINT_PORT" -m state --state NEW,ESTABLISHED -j ACCEPT
|
||||
iptables -A INPUT -i eth0 -s "$WG_ENDPOINT_IP" -p udp --sport "$WG_ENDPOINT_PORT" -m state --state ESTABLISHED -j ACCEPT
|
||||
|
||||
# All traffic through WireGuard
|
||||
iptables -A INPUT -i wg0 -j ACCEPT
|
||||
@@ -328,7 +328,9 @@ systemctl enable apparmor 2>/dev/null || true
|
||||
|
||||
# Enforce AppArmor profiles for critical services
|
||||
for profile in /etc/apparmor.d/*; do
|
||||
[ -f "$profile" ] && aa-enforce "${profile##*/}" 2>/dev/null || true
|
||||
if [ -f "$profile" ]; then
|
||||
aa-enforce "${profile##*/}" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user