views:

6559

answers:

3

I'm trying to install a site under an alternative port on a server, but the port may be closed by a firewall. Is there a way to ping out or in, on a specific port, to see if it is open?

+1  A: 

Something like link?

bob
A: 

Do you want a tool for doing it? There is a website at http://www.canyouseeme.org/. Otherwsie, you need some other server to call you back to see if a port is open...

Douglas Mayle
+6  A: 

Assuming that it's a TCP (rather than UDP) port that you're trying to use:

  1. On the server itself, use "netstat -an" to check to see which ports are listening

  2. From outside, just "telnet host port" to see if the connection is refused, accepted, or timeouts

On that latter test, then in general:

  • connection refused means that nothing is running on that port
  • accepted means that something is running on that port
  • timeout means that a firewall is blocking access
Alnitak

related questions