VMware VSHIELD APP 1.0 - API Uživatelský manuál Strana 70

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 132
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 69
vShield API Programming Guide
70 VMware, Inc.
<action>allow</action>
<logged>false</logged>
<notes></notes>
<destination/>
</layer2FirewallRule>
</firewallConfiguration>
</VshieldAppConfiguration>
Change Firewall Configuration
ToconfigurevShieldAppfirew allrules,
1Querythefirewallrulesforthecontextyouwanttoconfigure.Thecontextcanbeadatacenter,cluster,or
portgroup.
2ExtracttheXMLfromtheresponsebodyinstep1andmakethedesiredchangestoit.
3Extractthevalueofthegenerationnumberfrom
theEtagheaderoftheresponseinStep1,andadditas
theifmatchheaderinthePOSTcall.
Forexample,thegenerationnumberintheGETresponseforthefirewallconfigurationofadatacenteris
1312802020950(fromExample 64).Youmustnowspecifythefollowingheaderinthe
RequestBodyofa
POSTcommandforchangingthedatacenterfirewallconfiguration:
If-Match: "1312802020950"
4PassthemodifiedXMLfromstep2astheRequestBodyinaPOSTcall.
IMPORTANTYoumustspecifythecompleteconfigurationforacontextinthePOSTcall.
Revert to Default Firewall Configuration
Youcanrevertthefirewallconfigurationforthenodetoitsdefaultbydeletingallrulesthatwerecreatedfor
thespecifiedcontextID,includingdefaultrules.ForadatacenterorIPnamespace,afreshsetofdefaultrules
aresubstituted.
Example 6-10. Delete firewall configuration and revert to default
Example:
DELETE https://<vsm-ip>/api/2.0/app/firewall/<contextID>/config
Configuring Fail-Safe Mode for vShield App Firewall
Bydefault,failureorunavailabilityofthevShieldAppapplianceresultsintrafficbeingblocked(failclose).
Youcanchangethistoallowtraffic(failopen).
Configure Fail-Safe Mode for vShield App Firewall
Example 6-11. Configure fail-safe mode
Example:
PUT https://<vsm-ip>/api/2.1/app/failsafemode
Request Body
<VshieldAppConfiguration>
<failsafeConfiguration>
<failsafemode>FAIL_OPEN</failsafemode>
</failsafeConfiguration>
Zobrazit stránku 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 131 132

Komentáře k této Příručce

Žádné komentáře