For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create new firewall

Create a new firewall. Use this endpoint to set up new firewall configurations for VPS security.

Create new firewall

post

Create a new firewall.

Use this endpoint to set up new firewall configurations for VPS security.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
namestringRequiredExample: My Firewall Group
Responses
200

Success response

application/json
idintegerOptional

Firewall ID

Example: 65224
namestringOptional

Firewall name

Example: HTTP and SSH only
is_syncedbooleanOptional

Is current firewall synced with VPS

Example: false
created_atstring · date-timeOptionalExample: 2021-09-01T12:00:00Z
updated_atstring · date-timeOptionalExample: 2021-09-01T12:00:00Z
post/api/vps/v1/firewall
POST /api/vps/v1/firewall HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "name": "My Firewall Group"
}
{
  "id": 65224,
  "name": "HTTP and SSH only",
  "is_synced": false,
  "rules": [
    {
      "id": 24541,
      "action": "accept",
      "protocol": "TCP",
      "port": "1024:2048",
      "source": "any",
      "source_detail": "any"
    }
  ],
  "created_at": "2021-09-01T12:00:00Z",
  "updated_at": "2021-09-01T12:00:00Z"
}

Last updated

Was this helpful?