Firewall rule set with deny action based on IP and port range
content-length: 695
<?xml version="1.0" encoding="UTF-8"
Get the Status of the Default Policy for a vShield Edge
You can check the action—allow or deny—currently enforced for the default firewall policy.
Example 5-25. Get the Status of the Default Policy for a Specific Network
Request:
GET <vShield_Manager-uri>/api/1.0/network/<portgroup-moid>/firewall/default
Example:
GET /api/1.0/network/network-244/firewall/default HTTP/1.1
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 10.112.196.213
Change the Default Firewall Policy Action
You can change the default firewall policy action to either allow all traffic or deny all traffic.
Example 5-26. Change the Action of the Default Firewall Policy on a vShield Edge
Request:
PUT <vShield_Manager-uri>/api/1.0/network/<portgroup-moid>/
Example:
PUT /api/1.0/network/network-244/firewall/default/allow HTTP/1.1
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 10.112.196.213
Get Details of a Specific Firewall Rule
You can view the details of a specific firewall rule applied on a vShield Edge.
Example 5-27. Get a Firewall Rule
Request:
GET <vShield_Manager-uri>/api/1.0/network/<portgroup-moid>/
VMware, Inc.
standalone="yes"?><VShieldEdgeConfig><FirewallConfig><FirewallRule><protocol>t
cp</protocol><sourceIpAddress><IpRange><rangeStart>172.17.1.13</rangeStart><ra
ngeEnd>172.17.1.16</rangeEnd></IpRange></sourceIpAddress><sourcePort><PortRang
e><rangeStart>9922</rangeStart><rangeEnd>9925</rangeEnd></PortRange></sourcePo
rt><destinationIpAddress><IpRange><rangeStart>192.168.102.6</rangeStart><range
End>192.168.102.9</rangeEnd></IpRange></destinationIpAddress><destinationPort>
<PortRange><rangeStart>22</rangeStart><rangeEnd>25</rangeEnd></PortRange></des
tinationPort><direction>in</direction><action>deny</action></FirewallRule></Fi
rewallConfig></VShieldEdgeConfig>
firewall/default/{allow|deny}
firewall/rules/<rule-id>
Chapter 5 vShield Edge Management
37
Need help?
Do you have a question about the VSHIELD APP 1.0 - API and is the answer not in the manual?
Questions and answers