VMware VSHIELD APP 1.0 - API Manuale Utente Pagina 50

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 132
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 49
vShield API Programming Guide
50 VMware, Inc.
Example 5-18. Configure NAT service
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<natConfig>
<rule>
<type>snat</type>
<internalIpAddress>192.168.10.11</internalIpAddress>
<externalIpAddress>10.112.2.146</externalIpAddress>
<enableLog>false</enableLog>
</rule>
<rule>
<type>dnat</type>
<protocol>tcp</protocol>
<internalIpAddress>192.168.10.2-192.168.10.12</internalIpAddress>
<internalPort>any</internalPort>
<externalIpAddress>10.112.2.146</externalIpAddress>
<externalPort>any</externalPort>
<enableLog>true</enableLog>
</rule>
</natConfig>
</vshieldEdgeConfig>
Forthedatapathtowork,youneedtochangethedefaultfirewallpolicytoALLOW,orpunchFirewallrules
toallowdatatrafficonexternalandinternalinterfaces.
Rules:
For<protocol>optionstcpandudp,youmustspecifysourcePortanddestinationPortelements.
Foroptionsicmpandany,thesourcePortanddestinationPortelementsarenotexpected
Youmustadd<icmpType>ifyouconfigureicmpastheprotocol.
TheexternalIpAddressandinternalIpAddresselementscanbeenteredineitherofthesemethods:
<ipAddress>specifiedasasingleIPaddress,ahyphenseparatedIPaddressrange(forexample,
192.168.10.1-192.168.10.2555) orasubnetinCIDRnotation(198.168.10.1/24).
thekeywordany
TheexternalPortandinternalPortparameterscanbeenteredinoneofthefollowingformats:the
keywordany,theportnumberasaninteger,orarangeofportnumber,forexampleportX-portY.
YoucanaddmultipleSNATrulesbyenteringmultiple<type>snat</type>sectionsinthebody.
SNATdoesnotsupportportorprotocolparameters.
Loggingisdisabledbydefault.Toenablelogging,addan<enableLog>elementsettotrue.
Delete NAT Configuration
TodeleteNATconfiguration,postanemptyruleset.
Example 5-19. Delete NAT rules
POST https://<vsm-ip>/api/2.0/networks/<internal-portgroup-vc-moref-id>/edge
<vshieldEdgeConfig xmlns="vmware.vshield.edge.2.0">
<natConfig/>
</vshieldEdgeConfig>
Vedere la pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 131 132

Commenti su questo manuale

Nessun commento