Using Avahi command-line programs to discover services

If you are running the Network IPS appliance on Linux, use Avahi to browse for services that are broadcasted on the local network.

Before you begin: You must install the Avahi RPM package for the Linux operating system that you are using before you can use the following command-line programs.

Using the avahi-browse command-line program /usr/bin/avahi-browse

avahi-browse is a command-line program that you use to browse for all mDNS broadcasts on the network and to resolve the host name and the IP address of the device that is broadcasting.

avahi-browse command-line options: avahi-browse <options> <service type>

Use the following command-line options with the avahi-browse program:
Option Description
-d <domain> Specify the domain that you want to browse for services on. If you do not specify a domain, then all domains are browsed. The Network IPS appliance broadcasts on the .local domain.
--resolve Displays the host name and the IP address of the Network IPS appliance, including the service advertisement string.
Example: IBM Security Network IPS GX4004--SSH
-t Terminates the avahi-browse program after it dumps the current list of named services. The avahi-browse program no longer runs or listens for new broadcasts.
-a Displays all service broadcasts on the network. You are not required to specify a <service type> with this command-line option.
--no-db-lookup Instructs the avahi-browse program not to translate service types.
Example: Translating _ssh._tcp to a friendlier name such as SSH Remote Terminalor translating _http._tcp to Web Site

Example of viewing the SSH broadcast for your Network IPS appliance

Type avahi-browse -d local _ssh._tcp --resolve -t at the command line.

(-d and -t are optional. If you use the -a command-line option instead of _ssh._tcp, you see all broadcasts.) The --resolve command-line option provides the host name and the IP address of the Network IPS appliance so that you can SSH to that appliance by using ssh admin@<hostname>.local or ssh admin@<ip_address>.

Example of viewing a website broadcast for your Network IPS appliance

  1. Type avahi-browse -d local _http._tcp --resolve -t at a command line.
  2. Open a web browser. In the Location bar, type https://<hostname> or https://<ip_address> by using the host name or the IP address that was returned by the --resolve command-line option.

Using the avahi-discover-standalone command-line program /usr/bin/avahi-discover-standalone

The avahi-discover-standalone command-line program is an X Window program that displays all the discoverable services across all domains. You can run this program only from an X Window session.

This command-line program is the same as running avahi-browse -a --resolve. You use the host name and the IP address that is returned by this program to connect to a Network IPS appliance by using SSH or by using a web browser.