I can test some specific port by nc -zv <server_ip> <port>
or by accessing it in browser http://<server_ip>:<port>/
.
But how to get a list of all reachable ports on server?
Update: Also I was able to scan port range with this command:
nc -zv <server_ip> <port_range_start>-<port_range_end> 2>&1 | grep succeeded
The first variant scans all TCP ports; the second all UDP ports. Note that if you try broad portscanning over a public network, or against a server/network for which you are not an administrator, you are likely to trigger an IDS and get blocked.
Net map is a powerful network scanner. If you wish to know more about the target computer and it's open ports use:
or, for example
This will report open ports, and information about the target machine. There are many many options for nmap. Refer to the info or man pages