Initial Lab Setup
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- KONFIGURATION ---
|
||||
UNIFI_IP="192.168.123.254"
|
||||
API_TOKEN="DEIN_KOPIERTER_API_TOKEN"
|
||||
OUTPUT_FILE="~/lab-rack/unifi_firewall_rules.json"
|
||||
|
||||
echo "📥 Lade Firewall-Konfiguration via API-Token herunter..."
|
||||
|
||||
# Der offizielle Endpunkt für die Sicherheits- und Firewallkonfiguration
|
||||
curl -s -S -k -X GET \
|
||||
-H "X-API-KEY: $API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
"https://$UNIFI_IP/proxy/network/api/v2/sites/default/firewall/rules" \
|
||||
| jq '.' > $(eval echo $OUTPUT_FILE)
|
||||
|
||||
echo "✅ Fertig!"
|
||||
Reference in New Issue
Block a user