Skip to main content

Tcp Edge IP Restriction Module

Replace TCP Edge IP Restriction Module

Request

PUT /edges/tcp/{id}/ip_restriction

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"ip_policy_ids":["ipp_2cSjzeP11jBo0pICxVk2UfFz9yR"]}' \
https://api.ngrok.com/edges/tcp/edgtcp_2cSjzjq2yZmLh2f0TS1PrfNqh48/ip_restriction

Parameters

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policy_idsList<string>list of all IP policies that will be used to check if a source IP is allowed access to the endpoint

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2cSjzeP11jBo0pICxVk2UfFz9yR",
"uri": "https://api.ngrok.com/ip_policies/ipp_2cSjzeP11jBo0pICxVk2UfFz9yR"
}
]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policiesReflist of all IP policies that will be used to check if a source IP is allowed access to the endpoint

Ref fields

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource

Get TCP Edge IP Restriction Module

Request

GET /edges/tcp/{id}/ip_restriction

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tcp/edgtcp_2cSjzjq2yZmLh2f0TS1PrfNqh48/ip_restriction

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2cSjzeP11jBo0pICxVk2UfFz9yR",
"uri": "https://api.ngrok.com/ip_policies/ipp_2cSjzeP11jBo0pICxVk2UfFz9yR"
}
]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policiesReflist of all IP policies that will be used to check if a source IP is allowed access to the endpoint

Ref fields

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource

Delete TCP Edge IP Restriction Module

Request

DELETE /edges/tcp/{id}/ip_restriction

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tcp/edgtcp_2cSjzjq2yZmLh2f0TS1PrfNqh48/ip_restriction

Response

Returns a 204 response with no body on success