DEV Community


Posted on • Updated on

Finding Open Ports

Finding Open Ports in your server or local machine is an essential task to figure out which service is running in, perhaps maybe there is an unknown application in running to trace, send your data, but you don't know. Let's find how can we find Open Ports.

Open Ports: currently used by an application
Close Ports: free to use


Open your terminal up and type:
netstat -atu

-a: socket connection
-t: TCP connection
-u: UPD connection

Socket connect two-node on the same network to communicate with each other.
TCP transfer file from one place to another with 100% guarantee, but TCP make handshake before connection, once the client sends the SYN to the server, server get back with SYN ACK if the server was alive, then the client send the ACK to the server and done.
UDP is same as TCP, but UPD doesn't make handshakes like TCP SYN -> SYN ACK -> ACK. it doesn't care about errors, UDP is faster than TCP.

once you run the command you'll get a list of services running. only keep Open these Port which is required, so nobody will be able to make a connection with your machine!

Top comments (0)