Add Custom rule to firewall esxi 5 (Open tcp port 25 for SMTP)

The file of  rule of firewall esxi is locate to:

/etc/vmware/firewall/

for view rule:

esxcli network firewall ruleset list

create file smtp.xml whit:

<!– Firewall configuration information –>
<ConfigRoot>
  <!– SMTP –>
  <service>
    <id>SMTP</id>
    <rule id=’0000′>
      <direction>outbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>25</port>
    </rule>
    <rule id=’0001′>
      <direction>inbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>25</port>
    </rule>
    <enabled>true</enabled>
    <required>false</required>
  </service>
</ConfigRoot>

esxcli network firewall refresh 
esxcli network firewall ruleset list

and show end to list the new rule

type  

esxcli network firewall ruleset rule list | grep SMTP

for view details of rule


Next Post i show command for make persist this configuratione

HOW TO MAKE PERSIST CHANGE FIREWALL


Add Custom rule to firewall esxi 5 (Open tcp port 25 for SMTP)

Leave a Reply

Your email address will not be published.