Posted almost 4 years ago. Visible to the public. Repeats.

How to find out what is running on a port on a remote machine

By convention, common protocols use a defined port, like 80 for HTTP or 443 for HTTPS.

You can use nmap to find out what service is running behind a given port, and most often see some details about it. This can be helpful if servers don't offer the services you expect for some ports. If you'd like to see what ports are listing on your local machine, you might want to use netstat instead of nmap.

Note that nmap's service discovery may trigger several requests.


When using nmap, adding the -A switch will make nmap discover details about the given port. Specify that port using -p.

Here we look at port 443 on

$ nmap -A -p 443 Starting Nmap 6.40 ( ) at 2016-07-26 13:45 CEST Nmap scan report for ( Host is up (0.014s latency). PORT STATE SERVICE VERSION 443/tcp open http nginx |_http-methods: No Allow or Public header in OPTIONS response (status code 400) |_http-title: 400 The plain HTTP request was sent to HTTPS port | ssl-cert: Subject: | Not valid before: 2015-10-14T12:42:03+00:00 |_Not valid after: 2016-10-14T12:42:03+00:00 |_ssl-date: 2016-08-05T11:33:52+00:00; +9d23h48m18s from local time. | tls-nextprotoneg: | h2 |_ http/1.1 Service detection performed. Please report any incorrect results at . Nmap done: 1 IP address (1 host up) scanned in 6.63 seconds

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Arne Hartherz
Last edit:
almost 2 years ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more