How to make firewall changes in VMWare ESX server

If you have been working on VMWare's ESX server and been missing your GUI environment, and finding yourself lost on how to make changes to the server's firewall to open a custom port etc, here is your help!

In this example, lets say you want to open up port 3052 and 6547 UDP and TCP

- Log on to the ESX server using SSH

- To see all the current firewall entries give the command "esxcfg-firewall –q"

- To open the required ports give the following commands one by one without the quotes:

esxcfg-firewall -o 3052,udp,in,FriendlyNameToRecognizeTheRule”
“esxcfg-firewall -o 3052,udp,out,FriendlyNameToRecognizeTheRule”
“esxcfg-firewall -o 3052,tcp,in,FriendlyNameToRecognizeTheRule”
“esxcfg-firewall -o 3052,tcp,out,FriendlyNameToRecognizeTheRule”
“esxcfg-firewall -o 6547,tcp,in,FriendlyNameToRecognizeTheRule”