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?
Type "Network Utility" in the search field and select Network Utility. Select Port Scan, enter an IP address or hostname in the text field, and specify a port range. Click Scan to begin the test. If a TCP port is open, it will be displayed here.
On Windows you can use
netstat -na | find "your_port"
to narrow down the results. You can also filter for LISTENING
, ESTABLISHED
, TCP
and such. Mind it's case-sensitive though.
Assuming that it's a TCP (rather than UDP) port that you're trying to use:
On the server itself, use netstat -an
to check to see which ports are listening.
From outside, just use telnet host port
(or telnet host:port
on Unix systems) to see if the connection is refused, accepted, or timeouts.
On that latter test, then in general:
On Windows 7 or Windows Vista the default option 'telnet' is not recognized as an internal or external command, operable program or batch file. To solve this, just enable it: Click *Start** → Control Panel → Programs → Turn Windows Features on or off. In the list, scroll down and select Telnet Client and click OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With