O'Reilly logo

Squid Proxy Server 3.1 Beginner's Guide by Kulbir Saini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – finding the program listening on a specific port

To resolve this issue, we first have to find out which program is listening on the port in question. The process of finding out the program listening on a port depends the operating system we are using. The following methods are used for popular operating systems:

For Linux-based operating systems

For Linux-based operating systems, we can use the following command:

lsof –i :8080

Don't forget to replace 8080 with the appropriate port number.

For OpenBSD and NetBSD

For OpenBSD and NetBSD, we can use the fstat command as follows:

fstat | grep 8080

This will give us a list of connections involving port 8080.

For FreeBSD and DragonFlyBSD

The program for determining a program listening on a port ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required