# list_tunnels
The EvoShield list_tunnels GET endpoint returns a list of all active EvoShield Remote tunnels for a specified service.
Parameters
account
: The account key - which can be found in the Settings area of the Evolution Host client area: https://evolution-host.com/controlPanelservice_key
: The unique key for the particular Evolution Host service being used in this API call - Can be found by using the /list_services API endpointJSON array of objects, each containing information regarding a tunnel that has been created for the specified service.
id
: A unique tunnel ID assigned to each EvoShield tunnel - This key should be used for any tunnel specific API endpointsname
: The name/label of the tunnel (Optional)operating_system
: The OS of the machine the tunnel was created foras_default_gateway
: A GRE tunnel specific boolean specifying whether the tunnel is responsible for handling all traffic for the machinetype
: Specifies whether it is a GRE or NAT based tunnelprotected_ip
: The IP address you have specified the tunnel should protect (back-end)evoshield_public_ip
: The dedicated public IP address that has been assigned to the tunnel (front-end)forwarding_endpoints
: An array the IP addresses that clean traffic may be forwarded to your server from (in addition to evoshield_public_ip
)gre
: An array of information about the GRE tunnel (or null if type == NAT) ⇢key:
The GRE key that has been generated. ⇢network:
The internal subnet of the GRE tunnel ⇢gateway:
The internal gateway of the GRE tunnel ⇢ip:
The main internal IP address of the GRE tunnel. This IP address can be used for binding applications toExample Call
$url = "https://evolution-host.com/api.php";
$action = "list_tunnels";
$callData = http_build_query([
'account' => 'YOUR_ACCOUNT_KEY', //Obtain key from the Evolution Host client panel
'service_key' => 'YOUR_SERVICE_KEY', //Obtain key from the /list_services API endpoint
'action' => $action,
]);
$ch = curl_init($url . '?' . $callData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$result = curl_exec($ch);
if($result != false)
{
$result = json_decode($result);
if(json_last_error() !== JSON_ERROR_NONE)
{
echo 'JSON Error: ' . json_last_error_msg();
}
echo '<pre>' . json_encode($result, JSON_PRETTY_PRINT) . '</pre>';
}
curl_close($ch);
Example Response
[
{
"id": 3663432790,
"name": "GRE BSD GRE KEY",
"operating_system": "BSD",
"as_default_gateway": false,
"type": "GRE",
"evoshield_public_ip": "246.54.10.121",
"protected_ip": "8.8.8.8",
"gre": {
"key": 3843198414,
"network": "10.0.26.0\/30",
"gateway": "10.0.26.1",
"ip": "10.0.26.2"
}
},
{
"id": 1385315722,
"name": "GRE BSD NO GRE KEY",
"operating_system": "BSD",
"as_default_gateway": false,
"type": "GRE",
"evoshield_public_ip": "126.59.10.111",
"protected_ip": "9.9.9.9",
"gre": {
"network": "10.0.27.0\/30",
"gateway": "10.0.27.1",
"ip": "10.0.27.2"
}
},
{
"id": 3265747304,
"gre": null,
"name": "NAT Tunnel",
"operating_system": "Linux",
"as_default_gateway": false,
"type": "NAT",
"evoshield_public_ip": "336.59.10.124",
"protected_ip": "1.1.1.1",
"forwarding_endpoints": [
"446.59.10.127",
"446.59.10.128",
"446.59.10.129",
"446.59.10.130",
"446.59.10.131",
"446.59.10.132",
“446.59.10.133”,
“446.59.10.134”
]
},
{
"id": 3284353077,
"name": "GRE All Traffic",
"operating_system": "Linux",
"as_default_gateway": true,
"type": "GRE",
"evoshield_public_ip": "246.59.10.156",
"protected_ip": "2.2.2.2",
"forwarding_endpoints": [
"446.59.10.127",
"446.59.10.128",
"446.59.10.129",
"446.59.10.130",
"446.59.10.131",
"446.59.10.132",
“446.59.10.133”,
“446.59.10.134”
],
"gre": {
"network": "10.0.22.0\/30",
"gateway": "10.0.22.1",
"ip": "10.0.22.2"
}
},
{
"id": 1315837372,
"name": "GRE Do Not Route All Traffic",
"operating_system": "Linux",
"as_default_gateway": false,
"type": "GRE",
"evoshield_public_ip": "446.59.10.126",
"protected_ip": "3.3.3.3",
"forwarding_endpoints": [
"446.59.10.127",
"446.59.10.128",
"446.59.10.129",
"446.59.10.130",
"446.59.10.131",
"446.59.10.132",
“446.59.10.133”,
“446.59.10.134”
],
"gre": {
"network": "10.0.23.0\/30",
"gateway": "10.0.23.1",
"ip": "10.0.23.2"
}
}
]