Na mijn vorige post over Veeam FastSCP en de firewall van ESX. Besloot ik zelf een xml bestand te maken voor de MGE shutdown module.

Dit heb ik als volgt gedaan:

Download de XMLNotepad vanaf hier: http://www.microsoft.com/

Kopieer de FastSCP.xml en noem deze MgeUPS.xml

Open de MgeUPS.xml in XMLNotepad
ESXFirewallxml

Voeg de volgende code in:

<!– Firewall configuration information for MGE UPS Network Shutdown Module–>
<ConfigRoot>
<service>
<id>MgeUPS</id>
<rule id=”0000″>
<direction>outbound</direction>
<protocol>tcp</protocol>
<port type=”dst”>
<begin>80</begin>
<end>80</end>
</port>
<flags>-m state –state NEW</flags>
</rule>
<rule id=”0001″>
<direction>inbound</direction>
<protocol>tcp</protocol>
<port type=”dst”>
<begin>4679</begin>
<end>4680</end>
</port>
<flags>-m state –state NEW</flags>
</rule>
</service>
</ConfigRoot>

Daarna sla je het bestand op en kopieer je deze naar de /etc/vmware/firewall directory op je ESX server.

Als laatste voer je het commando: esxcfg-firewall -e MgeUPS uit. Let op dit is cAsEsEnEtIve. Deze naam is hetzelfde als het <id> in het bovenstaande xml bestand.

Daarna nog even het volgende commando uitvoeren: service mgmt-vmware restart.

Nu kun je in de VI client de nieuwe rule activeren.

ESXFirewallxml3

De nieuwe rules zijn geconfigureerd.

ESXFirewallxml2

Op deze manier kun je dus zelf kant en klare XML bestandjes klaarzetten en uitvoeren.

    Advertisement

    One thought on “VMware: Custom firewall rules via XML files

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )

    Connecting to %s

    This site uses Akismet to reduce spam. Learn how your comment data is processed.