O'Reilly logo

WordPress 3 Ultimate Security by Olly Connelly

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

Service or disservice?

Unnecessary or vulnerable network services, or daemons, that sit listening on ports waiting to process activity not only pose potential risks but also waste resources so, if you don't need it, weed it, then close the port. The first thing is to find out what's running.

Researching services with Netstat

Netstat provides network information, is installed by default (on your local PC as well as on the server), and should be properly understood to help secure a networked machine.

Let's carry out a service check, running netstat as root so we can see associated programs, and adding a grep parameter to specify those services that are listening on ports:

sudo netstat -tap | grep LISTEN

We can see MySQL which will be listening on ...

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