6.0

Table Of Contents
VMware, Inc. 135
Chapter 9 Managing vSphere Networking
YoucanperformthesemaintaskswithSPs:
CreateanSPwithesxcli network ip ipsec add.Youidentifythedatatomonitorbyspecifyingthe
selectorssourceanddestinationIPaddressandprefix,sourceportanddestinationport,upperlayer
protocol,directionoftraffic,actiontotake,andSPmode.ThelasttwooptionarethenameoftheSAto
useandthenameoftheSPthatisbeingcreated.Thefollowingexampleincludesextralinebreaksfor
readability.
esxcli network ip ipsec add
--sp-source=2001:0DB8:0001:/48
--sp-destination=2001:0DB8:0002:/48
--source-port=23
--destination-port=25
--upper-layer-protocol=tcp
--flow-direction=out
--action=ipsec
--sp-mode=transport
--sp-name sp_2
ListanSPwithesxcli network ip ipsec list.ThiscommandreturnsSPscurrentlyavailable.All
SPsarecreatedbytheadministrator.
RemoveanSPwithesxcli network ip ipsecremove.IftheSPisinusewhenyourunthiscommand,
thecommandcannotperformtheremoval.Youcanrunesxcli network ip ipsecremove
--removeallinsteadtoremovetheSPev enwhenitisinuse.
Managing the ESXi Firewall
Tominimizetheriskofanattackthroughthemanagementinterface,ESXiincludesafirewallbetweenthe
managementinterfaceandthenetwork.Toensuretheintegrityofthehost,onlyasmallnumberoffirewall
portsareopenbydefault.ThevSphereSecuritydocumentationexplainshowtosetupfirewallsfor
your
environmentandwhichportsyoumighthavetotemporarilyenableforcertaintraffic.
Youmanagefirewallsbysettingupfirewallrulesets.vSphereSecuritydocumentationexplainshowtoperform
thesetaskswiththevSphereWebClient.Youcanalsouseesxcli network firewalltomanagefirewall
rulesetsandtoretrieveinformationabout
them.Specifyoneoftheoptionslistedin“ConnectionOptionsfor
vCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
To limit shell access
1CheckfirewallstatusandsshServerrulesetstatus.
esxcli <conn_options> network firewall get
Default Action: DROP
dir [in | out] flow-direction [in |
out]
Directioninwhichyouwanttomonitorthetraffic.Tomonitor
trafficinbothdirections,createtwopolicies.
action [none |
discard | ipsec]
action [none | discard
| ipsec]
Actiontotakewhentrafficwiththespecifiedparametersis
encountered.
none‐‐Takenoaction,thatis,allowtrafficunmodified.
discard‐‐Donotallowdatainorout.
ipsec‐‐
Usetheauthenticationandencryptioninformation
specifiedintheSAtodeterminewhetherthedatacomefrom
atrustedsource.
sp-mode [tunnel |
transport]
sp-mode [tunnel |
transport]
Mode,eithertunnelortransport.
sa-name sa-name NameoftheSAtousebythisSP.
vicfg-ipsec Option esxcli Option Description
CAUTIONRunningesxcli network ip ipsecremove --removeallremovesallSPsonyoursystem
andmightleaveyoursysteminaninconsistentstate.