Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a way to configure a scheduled check for open ports on a list of servers and to get notified if something has changed from last check.

what's the best way to do it? If there is some solution which talk with Nagios it would be even better.

share|improve this question
up vote 5 down vote accepted

You could use check_udp and check_tcp if you know which ports should be open. This will check if a certain port is available for nagios on a remote server. You can add a service (check_udp/tcp) for each port you want to check on each server.

If you want to look for 'new/unidentified' open ports on a remote server, you could use check_scan. This will check for changes in the open ports. The first time it runs, it will create a baseline, the following checks will be checked against this baseline.

share|improve this answer
I want to check all ports (like using nmap) and on a bunch of servers :) In the simplest way to describe it, it's like to run nmap (on each of the servers) every 5 hours and to be notified if something has changed. – SecondThought May 22 '12 at 12:42
Ah sorry, got it the other way around, I'll update my answer :) – Bart De Vos May 22 '12 at 12:47
Notify your hosting company and/or network and security administrators before running port scans or you may be blacklisted. – ramruma May 22 '12 at 12:57
@ramruma: Around here, we assume that the people asking are the people that should be notified. – Bart De Vos May 22 '12 at 13:06
@BartDeVos Thank you! I've run through some options (like PBNJ, nmap-diff etc) and finally settled down with this check_scan. – SecondThought May 23 '12 at 6:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.