VMware VSHIELD MANAGER 4.1.0 UPDATE 1 - API Manual de usuario Pagina 52

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 90
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 51
vShield API Programming Guide
52 VMware, Inc.
Example 6-1. Viewing the Firewall Rule Set for a Container
Request:
GET <vshield_manager-uri>/api/1.0/zones/<container-moref-id>/firewall/rules
Example:
GET /api/1.0/zones/datacenter-4361/firewall/rules HTTP/1.1
Host: localhost
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Post an App Firewall Rule Set for a Container
YoucanaddanAppFirewallrulesetviaRESTforadatacenter,cluster,orportgroupcontainer.
ThevShieldManagerprocessesthepostedXMLfileasacompleterulesetforthespecifiedcontainer.The
currentcontainerrulesetisreplacedwiththisnewsetofrules.
Ifyouadd
anewruletoanexistingruleset,thenewrulemustbeidentifiedasRuleID0:
<RuleSet><Rule><ID>0</ID>...</Rule></RuleSet>.Ifyouareupdatinganexistingruleset,youmust
usethesameRuleIDsasthecurrentrulesettomaintaincurrentrulesafterthenewrulesetisposted.
Example 6-2. Post a Firewall Rule Set at the Datacenter Level
Request:
POST <vshield_manager-uri>/api/1.0/zones/<container-moref-id>/firewall/rules
Example:
POST /api/1.0/zones/datacenter-7/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"?>
<vshieldZonesFirewallConfiguration><ContainerAssociation><Container id="vShield">
<InstanceId>datacenter-7</InstanceId></Container><Container id="ANY"><Name>ANY
</Name></Container></ContainerAssociation><RuleSet><Rule><ID>0</ID><Precedence>
High</Precedence><Position>1</Position><Source ref="vShield" exclude="false"/>
<Destination ref="vShield" exclude="true"/><SourcePorts>ANY</SourcePorts>
<Application type="UNICAST">FTP</Application><DestinationPorts>21
</DestinationPorts><Protocol>TCP</Protocol><Action>ALLOW</Action><Log>false</Log>
<Notes></Notes></Rule><Rule><ID>58024</ID><Precedence>High</Precedence><Position>1
</Position><Source ref="vShield" exclude="true"/><Destination ref="vShield"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application type="UNICAST">MS-DS
</Application><DestinationPorts>445</DestinationPorts><Protocol>TCP</Protocol>
<Action>DENY</Action><Log>false</Log><Notes></Notes></Rule><Rule><ID>1001</ID>
<Precedence>Default</Precedence><Position>1</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY" exclude="false"/><SourcePorts>68
</SourcePorts><Application type="UNICAST">DHCP-Server</Application>
<DestinationPorts>67</DestinationPorts><Protocol>UDP</Protocol><Action>ALLOW
</Action><Log>false</Log><Notes></Notes></Rule><Rule><ID>1002</ID><Precedence>
Default</Precedence><Position>2</Position><Source ref="ANY" exclude="false"/>
<Destination ref="ANY" exclude="false"/><SourcePorts>67</SourcePorts>
<Application type="UNICAST">DHCP-Client</Application><DestinationPorts>68
</DestinationPorts><Protocol>UDP</Protocol><Action>ALLOW</Action><Log>false</Log>
<Notes></Notes></Rule><Rule><ID>1003</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>TCP</Protocol>
<Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><ID>1004</ID>
<Precedence>Default</Precedence><Position>4</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY" exclude="false"/><SourcePorts>ANY
</SourcePorts><Application type="UNICAST">ANY</Application><DestinationPorts>
Vista de pagina 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 89 90

Comentarios a estos manuales

Sin comentarios