How to See Opening Ports in VPS

how to see which ports are open in vps

In this post, I will show how to see detailed information about which ports are open and what services they are associated with using Nmap on an ubuntu linux vps.

Example Result

Executing the commands in this tutorial would generate output similar to the following:

Starting Nmap 7.80 ( https://nmap.org ) at 2023-07-29 07:03 UTC 
Nmap scan report for 100.100.0.237 
Host is up (0.00049s latency). 
Not shown: 994 filtered ports 
PORT STATE SERVICE 
22/tcp open ssh 
80/tcp open http 
443/tcp open https 
2000/tcp open cisco-sccp 
3389/tcp closed ms-wbt-server 
8090/tcp open opsmessaging

Introduction

Nmap, short for Network Mapper, is a powerful and versatile tool for network discovery and security auditing. In this post, we’ll explore how to install and use Nmap on an Ubuntu VPS (Virtual Private Server) to scan and identify open ports on a server.

Installation of Nmap on Ubuntu VPS

Getting Nmap up and running on your Ubuntu VPS is a straightforward process. Follow these steps:

Open your terminal: Start by accessing your Ubuntu VPS through the terminal.

Update Package Lists: Before installing any new software, it’s always a good idea to update your package lists. Run the following command to ensure you have the latest repository information.

sudo apt update

Install Nmap: To install Nmap, simply use the following command to download and install Nmap.

sudo apt install nmap

Usage of Nmap

Once Nmap is installed, you can start using it to scan for open ports on servers. The basic command structure is:

sudo nmap -sS [ip_address]

Here, -sS denotes a SYN scan, one of the most common types of scans used in Nmap. Replace [ip_address] with the IP address of the server you want to scan.

Example Usage

To scan the server with the IP address 167.172.90.237, you would use:

sudo nmap -sS 167.172.90.237

This output gives you detailed information about which ports are open and what services they are associated with. In the example result at the top of this post, we see that ports like 22 (SSH), 80 (HTTP), and 443 (HTTPS) are open.

Conclusion

Nmap is an invaluable tool to gain insight into the network infrastructure of a server. By following the steps outlined in this guide, you can easily install and use Nmap on your Ubuntu VPS to perform network scans. Nmap offers a wealth of information that can help you understand and secure your network environment.

Leave a Reply

Your email address will not be published. Required fields are marked *