How to: Find All Open Ports in Nodegrid
Intro: Finding All Open Ports
Nodegrid provides a wide variety of tools only accessible as root shell user. The easiest way to find all open TCP, UDP, or RAW ports in Nodegrid is to use the netstat command as root shell user.
- netstat is a command-line tool used to display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
- It provides information about network connections and listening ports.
- Online Reference: https://www.man7.org/linux/man-pages/man8/netstat.8.html
To use netstat, login to your Nodegrid with a console window or ssh as admin user. Then become root shell user.
- [admin@nodegrid /]# shell sudo su -
- root@nodegrid:~#
Now, as root you can run netstat command.
Find the Open TCP Ports
Run this command to find open TCP ports, these are the ports that are in LISTENING state
- root@nodegrid:~# netstat -atnp | grep LISTEN
Example output:
Find the Open UDP Ports
UDP ports are stateless, when a UDP port is open depends on if the application using it is ready to receive. Run this command to find all UDP ports.
- root@nodegrid:~# netstat -aunp
Example output:
Find the Open RAW Ports
RAW ports don't have states, they communicate at a lower level, bypassing the usual transport layer protocols.
- root@nodegrid:~# netstat -awnp
Netstat Options Explained
- -a: Displays all active connections and listening ports. This includes both TCP and UDP connections
- -w: Shows raw socket connections. Raw sockets allow direct sending and receiving of IP packets without any protocol-specific transport layer formatting.
- -n: Displays addresses and port numbers in numeric format, without resolving names. This is useful for faster output and avoiding DNS lookups.
- -p: Displays the process ID (PID) and program name associated with each connection. This helps identify which application is using a specific port.
- -t: Filters the output to show only TCP connections.
- -u: Filters the output to show only UDP connections.
Related Articles
How to Telnet and SSH to the Nodegrid Serial Ports
Note: by default, Telnet access is turned off with your Nodegrid Serial Console. Authorized users can use Telnet or SSH to connect directly to the console of a managed device if all of the following are true: Telnet / SSH protocol is enabled under ...
How to Configure Nodegrid Serial Ports
To configure the serial ports of your Nodegrid Serial Console, follow the guideline steps below. WebUI Log in as admin to the Nodegrid Serial Console Web interface. Go to Managed Devices page. Select the serial ports you want to configure, or check ...
How to build the set-up for Virtual Serial Ports communicating to an end device, via the Nodegrid OS
Abstract: In the industry, some legacy applications impose to use serial ports (COM) to interface with the industrial automates. In this article, we will study a set-up in which a desktop emulates a virtual serial COM, and conveys the connection via ...
Nodegrid Manager Installation in ESXi 5
Nodegrid Manager software is installed from an ISO file. The installation procedure is a three-stage process: Creating a virtual machine; Booting from the ISO file in order to install the software; Restarting and booting from the newly created ...
Nodegrid Manager Installation in ESXi 6
Nodegrid Manager software is installed from an ISO file. The installation procedure is a three-stage process: Creating a virtual machine; Booting from the ISO file in order to install the software; Restarting and booting from the newly created ...