Create new firewall
Create a new firewall. Use this endpoint to set up new firewall configurations for VPS security.
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 GroupResponses
200
Success response
application/json
idintegerOptionalExample:
Firewall ID
65224namestringOptionalExample:
Firewall name
HTTP and SSH onlyis_syncedbooleanOptionalExample:
Is current firewall synced with VPS
falsecreated_atstring · date-timeOptionalExample:
2021-09-01T12:00:00Zupdated_atstring · date-timeOptionalExample:
2021-09-01T12:00:00Z401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
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?