Create new firewall groups and define rules for incoming and outgoing traffic to secure your services.
Accept Example Content-Type Example description string required
· Example: ssh hemma och web name string required
· Example: ssh och web rules array required
· Example: [{"type":"in","action":"ACCEPT","proto":"tcp","enable":1,"dport":"22","comment":"SSH he... data object required data.group object required data.group.client_id integer required
· Example: 30000 data.group.created_at string required
· Example: 2026-02-10T00:00:00.000Z data.group.description string · nullable required
· Example: ssh hemma och web Nullable: may be null when not applicable.
data.group.id string required
· Example: 5636d181-0242-47c0-ac7e-7b93ac4feac9 data.group.is_system boolean required
· Example: false data.group.name string required
· Example: ssh och web data.group.updated_at string required
· Example: 2026-02-10T00:00:00.000Z data.message string required
· Example: Firewall group created successfully Human-readable message.
requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
success boolean required
· Example: true True for successful responses.
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
https://cloud.hostup.se/api/firewall-groups curl -X POST "https://cloud.hostup.se/api/firewall-groups" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ssh och web",
"description": "ssh hemma och web",
"rules": [
{
"type": "in",
"action": "ACCEPT",
"proto": "tcp",
"enable": 1,
"dport": "22",
"comment": "SSH hemma",
"source": "192.0.0.1",
"sport": "22"
},
{
"type": "in",
"action": "ACCEPT",
"proto": "tcp",
"enable": 1,
"dport": "80,443",
"comment": "Web (HTTP/HTTPS)"
}
]
}' {
"success": true,
"timestamp": "2026-02-10T00:00:00.000Z",
"requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
"data": {
"group": {
"id": "5636d181-0242-47c0-ac7e-7b93ac4feac9",
"client_id": 30000,
"name": "ssh och web",
"description": "ssh hemma och web",
"is_system": false,
"created_at": "2026-02-10T00:00:00.000Z",
"updated_at": "2026-02-10T00:00:00.000Z"
},
"message": "Firewall group created successfully"
}
} {
"name": "ssh och web",
"description": "ssh hemma och web",
"rules": [
{
"type": "in",
"action": "ACCEPT",
"proto": "tcp",
"enable": 1,
"dport": "22",
"comment": "SSH hemma",
"source": "192.0.0.1",
"sport": "22"
},
{
"type": "in",
"action": "ACCEPT",
"proto": "tcp",
"enable": 1,
"dport": "80,443",
"comment": "Web (HTTP/HTTPS)"
}
]
}