VMware VSHIELD APP 1.0 - API Bedienungsanleitung Seite 42

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 104
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 41
vShield API Programming Guide
42 VMware, Inc.
Example 5-12. Set firewall policy to allow all
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<firewallConfig>
<defaultPolicy>allow</defaultPolicy>
</firewallConfig>
</vshieldEdgeConfig>
Revert Firewall to Default
Thisreturnsthefirewalltodefaultconfiguration(deny)bydeletingexistingrules.
Example 5-13. Reset firewall to defaults
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<firewallConfig />
</vshieldEdgeConfig>
Create Firewall Rule with IPset or applicationSet
TogettheIDoftheIPsetorapplicationSet,seeexampleExample 218,“ListIPsetsonascope,”onpage 20
orExample 236,“Listapplicationsonagivenscope,”onpage 25.
Iftherefer en cedIPsetorapplicationSetisdeleted,therulewillthedisabledontheEdgeappliance.
Thedefaultpolicy
ineffectistodeny.Theexamplebelowsetsittoallowbasedontworules.
Example 5-14. IPset or applicationSet based firewall rule
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<firewallConfig>
<defaultPolicy>allow</defaultPolicy>
<enableLoggingForDefaultPolicy>false</enableLoggingForDefaultPolicy>
<blockIcmpErrors>false</blockIcmpErrors>
<rule>
<networkId>network-12</networkId>
<applicationIdentifier>application-20</applicationIdentifier>
<destinationIpAddress>
<ipAddress>10.112.2.49</ipAddress>
</destinationIpAddress>
<sourcePort>any</sourcePort>
<sourceIpAddress>
<ipsetIdentifier>ipset-2</ipsetIdentifier>
</sourceIpAddress>
<direction>in</direction>
<action>allow</action>
<enableLog>false</enableLog>
<disabled>false</disabled>
<comments>Used IpSet</comments>
</rule>
<rule>
<networkId>network-12</networkId>
<protocol>icmp</protocol>
<icmpType>address-mask-reply</icmpType>
<destinationIpAddress>
<ipAddress>10.112.2.150</ipAddress>
</destinationIpAddress>
<sourceIpAddress>
<ipAddress>any</ipAddress>
</sourceIpAddress>
<direction>out</direction>
<action>deny</action>
<enableLog>true</enableLog>
Seitenansicht 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 103 104

Kommentare zu diesen Handbüchern

Keine Kommentare