
VMware, Inc. 41
Chapter 5 vShield Edge Management
Example 5-11. Configure firewall
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<firewallConfig>
<defaultPolicy>deny</defaultPolicy>
<enableLoggingForDefaultPolicy>false</enableLoggingForDefaultPolicy>
<blockIcmpErrors>false</blockIcmpErrors>
<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>
<disabled>false</disabled>
</rule>
</firewallConfig>
</vshieldEdgeConfig>
Afterthisfirewallconfiguration,theadministratorcandefinefirewallrulesoninternalorexternal(usingthe
dvPo rtgroup’smanagedobjectID),oronthevpnInterfaceoftheEdge.RulescanbedefinedusingIPSetand
ApplicationsGroupingObjectsdefinedontheappropriatescope.Notes:
Youcanaddmultiplefirewallrulesbyenteringmultiple<rule></rule>sectionsinthebody.
ThevpnInterfaceistheexternalpublicaddressoftheVPN.
For<protocol>optionstcpandudp,youmustspecifysourcePortanddestinationPortelements.
Foroptionsicmpandany,thesourcePortanddestinationPortelementsarenotexpected.Other
protocoloptionsincludeigmp,ipencap,rsvp,gre,l2tp,sctp,andipv6.Alsoyouhavetheflexibility
toprovidea
newprotocolNameiftheprotocolisnotlistedbynameinthe<protocol>tag.
Youmustadd<icmpType>ifyouconfigureicmpastheprotocol.
Loggingisdisabledbydefault.Toenableit,add<enableLog>trueelementwithinthe<rule>section.
ThesourceIpAddressanddestinationIpAddresscanbeenteredinoneoftheseformats:
<ipAddress>specifiedasasingleIPaddress,ahyphen‐separatedIPaddressrange(forexample,
192.168.10.1-192.168.10.2555) orasubnetinCIDRnotation(198.168.10.1/24)
thekeywordany
an<ipSetIdentifier>,themanagedobjectIDofanIPset
ThesourcePortanddestinationPortparameterscanbeenteredinoneofthefollowingformats:the
keywordany,theportnumberasaninteger,orarangeofportnumber,forexampleportX-portY.
AnapplicationIdentifierfromGroupingObjectscanreplacethedestinationportandprotocol.
ThedisabledparametermeanstoremembertheruleonvShieldManagerbutnotpushtheruleontothe
Edgeappliance.Thisisoptionalanddefaultstofalse(pushtoappliance).
TheblockIcmpErrorsparameterisadvancedconfiguration.Itisoptionalanddefaultstofalse.
Change Firewall Rule to Allow
Thisdeletespreviouslyconfiguredfirewallrulesandsetsallowasthedefaultpolicy.
Commentaires sur ces manuels