VPS: Firewall
Create firewall rule
Create new firewall rule for a specified firewall.
By default, the firewall drops all incoming traffic, which means you must add accept rules for all ports you want to use.
Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
Use this endpoint to add new security rules to firewalls.
post/api/vps/v1/firewall/{firewallId}/rules
Path parameters
firewallIdinteger required
Example:9449049
Firewall ID
Request body
Example request
{
"protocol": "TCP",
"port": "443",
"source": "any",
"source_detail": "351.15.24.0/24"
}Response
Success response
Example response
{
"id": 24541,
"action": "accept",
"protocol": "TCP",
"port": "1024:2048",
"source": "any",
"source_detail": "any"
}