> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/api-reference/endpoints/vps/firewall/activate-firewall.md).

# Activate firewall

Activate a firewall for a specified virtual machine. Only one firewall can be active for a virtual machine at a time. Use this endpoint to apply firewall rules to VPS instances.

{% openapi src="<https://developers.hostinger.com/openapi/openapi.json>" path="/api/vps/v1/firewall/{firewallId}/activate/{virtualMachineId}" method="post" %}
<https://developers.hostinger.com/openapi/openapi.json>
{% endopenapi %}
