appliance techpreview networking firewall addr inbound: add
Add a firewall rule to allow or deny traffic from incoming IP address.
Request:
HTTP request
POST https://{server}/rest/appliance/techpreview/networking/firewall/addr/inbound
Request Body Structure:
{
"pos": 1,
"rule": {
"address": "string",
"interface_name": "string",
"policy": "deny",
"prefix": 1
}
}
"pos": 1,
"rule": {
"address": "string",
"interface_name": "string",
"policy": "deny",
"prefix": 1
}
}
<?xml version="1.0" ?>
<ns0:Add-Input xmlns:ns0="http://vmware.com/appliance/techpreview/networking/firewall/addr/inbound" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rule>
<address>string</address>
<prefix>1</prefix>
<policy>deny</policy>
<interface_name>string</interface_name>
</rule>
<pos>1</pos>
</ns0:Add-Input>
<ns0:Add-Input xmlns:ns0="http://vmware.com/appliance/techpreview/networking/firewall/addr/inbound" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rule>
<address>string</address>
<prefix>1</prefix>
<policy>deny</policy>
<interface_name>string</interface_name>
</rule>
<pos>1</pos>
</ns0:Add-Input>
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
pos | long | Position before which to insert the rule (zero-based). If you try to insert the rule in a position whose number is greater than the number of rules, the firewall rule is inserted at the end of the list. |
rule | firewall_address_rule | Firewall IP-based rule. |
rule.address | string | IPv4 or IPv6 address. |
rule.prefix | long | CIDR prefix used to mask address. For example, an IPv4 prefix of 24 ignores the low-order 8 bits of address. |
rule.policy | string | The allow or deny policy of this rule. Defines firewall rule policies Value is one of: deny: Deny packet with correpsonding address. allow: Allow packet with corresponding address. |
rule.interface_name | string | The interface to which this rule applies. An empty string or "*" indicates that the rule applies to all interfaces. |
Response:
HTTP Status Code: 200
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | Generic error |