Firewall-Regel hinzufügen
Fügt eine neue Firewall-Regel zu einem VPS hinzu.
Fügt eine neue Firewall-Regel zu einem VPS hinzu.
Erforderlicher Scope: vps:manage
| Parameter | Typ | Beschreibung |
|---|---|---|
id |
string | Die VPS-ID |
| Header | Erforderlich | Wert |
|---|---|---|
Authorization |
Ja | Bearer DEIN_API_SCHLÜSSEL |
Content-Type |
Ja | application/json |
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
port |
string | Ja | Port oder Portbereich (z.B. 80, 8000:8100) |
proto |
string | Ja | Protokoll: tcp, udp oder both |
action |
string | Ja | allow oder deny |
source |
string | Nein | Quell-IP-Adresse (Standard: any) |
comment |
string | Nein | Optionaler Kommentar für die Regel |
{
"port": "8080",
"proto": "tcp",
"action": "allow",
"source": "any",
"comment": "Web-App"
}
{
"data": {
"port": "8080",
"proto": "tcp",
"action": "allow",
"source": "any",
"success": true
}
}
| Status | Code | Beschreibung |
|---|---|---|
| 400 | INVALID_PORT |
Port muss ein nicht-leerer String sein |
| 400 | INVALID_PROTO |
Protokoll muss tcp, udp oder both sein |
| 400 | INVALID_ACTION |
Aktion muss allow oder deny sein |
| 400 | INVALID_BODY |
Der Anfragekörper ist kein gültiges JSON |
| 404 | NOT_FOUND |
VPS nicht gefunden oder kein Zugriff |
| 502 | FIREWALL_ERROR |
Firewall-Operation auf dem Server fehlgeschlagen |
curl -X POST "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall" \
-H "Authorization: Bearer DEIN_API_SCHLÜSSEL" \
-H "Content-Type: application/json" \
-d '{"port": "8080", "proto": "tcp", "action": "allow"}'
Firewall-Verwaltung ist auch über das manage_firewall MCP-Tool verfügbar.