nickip_01
Contributor
Contributor

Opening custom ports in firewall on ESX with powershell

Jump to solution

Hi,

I've looked around on this forum and on the web for a way to open a custom port (5050) on my ESX hosts with powershell but I've only managed to find a way to open already defined ports (e.g NTP).

Is there a way to open custom ports in the ESX hosts firewall with powershell?

Regards

Nick

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

The SDK only has methods for the predefined rulesets. Smiley Sad

That probably explains why the VITK doesn't offer this option either.

For custom rules I'm afraid you have to fall back to the esxcfg-firewall command on the ESX server.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
halr9000
Commander
Commander

Good question. It definitely is more straightforward to work with the existing firewall rules. Hmm, I don't see a way to do this immediately, I'll have to research more. I'm sure LucD knows how off the top of his head. Smiley Happy






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
LucD
Leadership
Leadership

The SDK only has methods for the predefined rulesets. Smiley Sad

That probably explains why the VITK doesn't offer this option either.

For custom rules I'm afraid you have to fall back to the esxcfg-firewall command on the ESX server.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
nickip_01
Contributor
Contributor

Ok then I know I have to log in to every ESX and modifiy the firewall one by one.

Thanks for the quick answers! Smiley Happy

/Nick

0 Kudos
halr9000
Commander
Commander

Whoah there, Nelly! Nobody said you had to do it one-by-one!

http://halr9000.com/article/445

http://halr9000.com/article/448

http://halr9000.com/article/450

(and this one just minutes ago) http://halr9000.com/article/633






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos