API Description
Use the List VPS Firewall plan API to list all the Firewall plan added by the end user.
Sample Code
<?php
include_once('/usr/local/virtualizor/sdk/enduser.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$enduser = new Virtualizor_Enduser_API($ip, $key, $pass);
$output = [];
$output = $enduser->listfirewallplans();
print_r(json_encode($output));
?>Output
{
"uid": "99",
"act": "firewallplan",
"timezone": "Asia/Kolkata",
"timenow": "May 26, 2025, 7:41 pm",
"vpsid": 0,
"username": "",
"user_type": "2",
"preferences": {
"fname": "",
"lname": "",
"theme": "default",
"language": "english",
"timezone": "Asia/Kolkata",
"default_enduser_timezone": "0"
},
"url": "index.php?",
"rdns": {
"pdnsid": null
},
"support_link": "",
"enable_2fa": 1,
"enable_eu_iso": 1,
"disable_webuzo": 1,
"show_user_notice": [],
"disable_recipes": 0,
"check_licensepro": true,
"counts": {
"vps": "0",
"users": "1",
"ssh_keys": "0",
"api": "1",
"euiso": "0",
"lb": "0",
"recipes": "0"
},
"billing_symbol": "$",
"enable_registration": 1,
"inhouse_billing": "1",
"force_preference": null,
"enable_kyc": 0,
"title": "Virtualizor1",
"protocol": [
"TCP",
"UDP",
"GRE",
"ESP",
"ICMP"
],
"fw_rules": null,
"firewall_status": null,
"firewall_plans": {
"31": {
"fwid": "31",
"uid": "99",
"fw_plan_name": "Enduser SSH",
"rules": "[\"4 IN ACCEPT TCP 2044 192.168.1.20\"]",
"is_admin": "0",
"admin_default": "0",
"default_policy": "0",
"for_servers": "0",
"data": []
}
},
"firewallplan_templates": null,
"current_firewall_plan": 0,
"rows_to_display": 5,
"time_taken": "0.078"
}