Simple bash-script that uses nmap to check the state of a specific network-port (tcp or udp) on a given host.


** -H -p

A Nagios Plugin that checks if the specified host is listening on specified

TCP/UDP port. 


  -h  --help                print this help message

  -V  --version             print program version

  -H         The host, the specified port is to be tested on

  -p                 The port number the host should listen to.


To check, if host myserver is listening on the port 80:

  $ ./ -H myserver -p 80



OK - Port 80 (tcp) is open

UNKNOWN - Port 80 (tcp) is filtered

CRITICAL - Port 80 (tcp) is closed