API Docs

This functionality of the Ubiquity API has been disabled. Looking for information on this transition to LeaseWeb? Click here for answers to FAQs and here for information on the LeaseWeb customer portal. Click here for information about the Leaseweb API.

Get to know fw_profile_rule_create

Overview: Creates a new firewall profile rule.

fw_profile_rule_create expects the following parameters:

  • profile_id - The identifier of the firewall profile.
  • direction - "ingress" or "egress" (Required)
  • remote_ip_prefix - Valid CIDR, null, or '0.0.0.0/0' to match all (Optional)
  • port_range_min - 1-65535 or null (Optional)
  • port_range_max - 1-65535 or null (Optional)
  • protocol - TCP, UDP, ICMP, or null (Optional)

Example:

$params = array(
    'profile_id'        => 77,
    'direction'         => "ingress",
    'port_range_min'    => 80,
    'port_range_max'    => 80,
    'protocol'          => "TCP",
);
$api->call('cloud.fw_profile_rule_create', $params);

Output:

Array
(
    [profile_id] => 77
    [direction] => ingress
    [port_range_min] => 80
    [port_range_max] => 80
    [protocol] => TCP
    [profile_rule_id] => 196
)