VMware Cloud Community
VirtualKenneth
Virtuoso
Virtuoso

How to check open ports on a destination server FROM ESX

Hi,

I'm wondering this for a long time now but I never had time to dig into it.

From Windows it's easy to check if a port on a destination server is open by just telnetting to it with the corresponding port number. How do I do this FROM an ESX host?

Is there something like telnet on there that i'm unaware of? (nmap isn't installed on ESX by default)

Thanks,

Kenneth

0 Kudos
6 Replies
ShanVMLand
Expert
Expert

Telnet is not installed by default. Not Recommended. If you need you can mount installable CD and in RPMS folder, you can find the telnet RPM.

Shan

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

But isn't there some ESX (Redhat) default command that is installed defaulty for this purpose?

0 Kudos
ShanVMLand
Expert
Expert

I am seeing the following commands possible to see "LISTEN". I have no luck with finding any equal commands like "telnet/nmap" Smiley Sad

1. netstat -a | egrep 'Proto|LISTEN'

2. lsof -i -n | egrep 'COMMAND|LISTEN'

Shan

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
0 Kudos
bulletprooffool
Champion
Champion

I spent a fair bit of time looking into this and there is no easy way to test whether ports are open between the ESXi Host and another machine (at least from a VM point of view)#

Are you trying to test connectivity to the management console, or a VM - as if it is a VM you can simply use the resident OS tools for that? Telnet etc?

One day I will virtualise myself . . .
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

I'm seeing this from a ESX point of view, from a VM point of view it's

quite easy.

bulletprooffool said the following on 28-5-2009 13:54:

Kenneth van Ditmarsch,

A new message was posted in the thread "How to check open ports on a destination server FROM ESX":

http://communities.vmware.com/message/1264936#1264936

Author : bulletprooffool

Profile : http://communities.vmware.com/people/bulletprooffool

Message:

0 Kudos
dmartushev
Contributor
Contributor

The easiest way I found to do this using the default tools available on an ESX Host is just to use the SSH client utility bundled in.

For instance, run the command:

ssh <server-name> -p <port #>

and if you get an error to the effect of: ssh: connect to host testserver.corp.lan port 27010: Connection refused then the firewall is likely denying access.

But, if the command doesn't error and just waits on the screen then a TCP connection has been establish thereby showing that some type of access has been given through the firewall. Sort of like using Telnet on a WinTel box.

0 Kudos