vShield API Programming Guide
Example 6-4. Posting a Firewall Rule Set at the Cluster Level
Example:
POST /api/1.0/zones/domain-c14/firewall/rules
content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 192.168.102.134
content-length: 655
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Example 6-5. Posting a Firewall Rule Set at the Port Group Level
Example:
POST /api/1.0/zones/portgroup-512/firewall/rules
content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 192.168.102.134
content-length: 655
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
56
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
ARP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1006</ID><Precedence>Default</Precedence><Position>2</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
OTHER IPv4</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><
Rule><ID>1007</ID><Precedence>Default</Precedence><Position>3</Position><Source
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
OTHER LAYER 3</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rul
e></RuleSet></vshieldZonesFirewallConfiguration>'
<vshieldZonesFirewallConfiguration><ContainerAssociation><Container
id="CL2"><InstanceId>domain-c14</InstanceId></Container></ContainerAssociation><Ru
leSet><Rule><ID>0</ID><Precedence>High</Precedence><Position>1</Position><Source
ref="CL2" exclude="false"/><Destination ref="CL2"
exclude="true"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">FTP</Application><DestinationPorts>21</DestinationPorts><Protocol>T
CP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><ID
>58012</ID><Precedence>High</Precedence><Position>2</Position><Source ref="CL2"
exclude="true"/><Destination ref="CL2"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ORACLE-HTTP</Application><DestinationPorts>7777</DestinationPorts><
Protocol>TCP</Protocol><Action>DENY</Action><Log>false</Log><Notes></Notes></Rule>
</RuleSet></vshieldZonesFirewallConfiguration>
<vshieldZonesFirewallConfiguration><ContainerAssociation><Container
id="zone-1"><InstanceId>udz-6</InstanceId></Container></ContainerAssociation><Rule
Set><Rule><ID>0</ID><Precedence>High</Precedence><Position>2</Position><Source
ref="zone-1" exclude="true"/><Destination ref="zone-1"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">FTP</Application><DestinationPorts>21</DestinationPorts><Protocol>T
CP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><ID
>58013</ID><Precedence>High</Precedence><Position>1</Position><Source ref="zone-1"
exclude="true"/><Destination ref="zone-1"
VMware, Inc.
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