Day 45: Port scanning
The best way to check opened port on a server is to use the nmap binary:
$ nmap api.iadvize.com
Starting Nmap 7.40 ( https://nmap.org ) at 2017-07-26 11:19 CEST
Nmap scan report for api.iadvize.com (35.157.221.55)
Host is up (0.022s latency).
Other addresses for api.iadvize.com (not scanned): 54.93.167.107
rDNS record for 35.157.221.55: ec2-35-157-221-55.eu-central-1.compute.amazonaws.com
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 4.96 seconds
On this example, we can see that only 2 ports are opened on the iAdvize load balancer: 80 and 443.
Install
On debian:
$ apt-get update
$ apt-get install nmap
by ops for non-ops