Sniffer installation: Difference between revisions

From VoIPmonitor.org
(Add troubleshooting section for download failures (alternative download.voipmonitor.org URL for Debian 11/12 redirect issues))
(Convert pre tags to syntaxhighlight lang=bash)
Line 9: Line 9:


;For 64-bit (x86_64) Systems (most common):
;For 64-bit (x86_64) Systems (most common):
<pre>
<syntaxhighlight lang="bash">
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
</pre>
</syntaxhighlight>


;For 32-bit (i686) Systems:
;For 32-bit (i686) Systems:
<pre>
<syntaxhighlight lang="bash">
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
</pre>
</syntaxhighlight>


;For ARMv6/v7 (e.g., Raspberry Pi):
;For ARMv6/v7 (e.g., Raspberry Pi):
<pre>
<syntaxhighlight lang="bash">
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz
</pre>
</syntaxhighlight>


=== Step 2: Extract and Run the Install Script ===
=== Step 2: Extract and Run the Install Script ===
The downloaded archive contains an installation script that automates the setup process.
The downloaded archive contains an installation script that automates the setup process.
<pre>
<syntaxhighlight lang="bash">
# Extract the archive
# Extract the archive
tar xzf voipmonitor-sniffer.tar.gz
tar xzf voipmonitor-sniffer.tar.gz
Line 35: Line 35:
# Run the installation script with root privileges
# Run the installation script with root privileges
./install-script.sh
./install-script.sh
</pre>
</syntaxhighlight>
The `install-script.sh` will:
The `install-script.sh` will:
* Copy the `voipmonitor` binary to `/usr/local/sbin/`.
* Copy the `voipmonitor` binary to `/usr/local/sbin/`.
Line 44: Line 44:
=== Step 3: Initial Configuration ===
=== Step 3: Initial Configuration ===
After the installation, you must edit the main configuration file to connect the sensor to your database and set basic parameters.
After the installation, you must edit the main configuration file to connect the sensor to your database and set basic parameters.
<pre>
<syntaxhighlight lang="bash">
nano /etc/voipmonitor.conf
nano /etc/voipmonitor.conf
</pre>
</syntaxhighlight>
At a minimum, configure your [[Sniffer_configuration#MySQL_Options|database connection settings]] and the [[Sniffer_configuration#Basic_Options|network interface]] to monitor.
At a minimum, configure your [[Sniffer_configuration#MySQL_Options|database connection settings]] and the [[Sniffer_configuration#Basic_Options|network interface]] to monitor.


Line 53: Line 53:


;Start the service:
;Start the service:
:<pre>systemctl start voipmonitor</pre>
:<syntaxhighlight lang="bash">systemctl start voipmonitor</syntaxhighlight>
;Stop the service:
;Stop the service:
:<pre>systemctl stop voipmonitor</pre>
:<syntaxhighlight lang="bash">systemctl stop voipmonitor</syntaxhighlight>
;Check the service status:
;Check the service status:
:<pre>systemctl status voipmonitor</pre>
:<syntaxhighlight lang="bash">systemctl status voipmonitor</syntaxhighlight>
;Enable the service to start automatically on boot:
;Enable the service to start automatically on boot:
:<pre>systemctl enable voipmonitor</pre>
:<syntaxhighlight lang="bash">systemctl enable voipmonitor</syntaxhighlight>


For a more detailed `systemd` service file template and advanced options, please see the [[Systemd_for_voipmonitor_service_management|systemd guide]].
For a more detailed `systemd` service file template and advanced options, please see the [[Systemd_for_voipmonitor_service_management|systemd guide]].
Line 67: Line 67:


;Alternative direct download for 64-bit systems:
;Alternative direct download for 64-bit systems:
<pre>
<syntaxhighlight lang="bash">
wget https://download.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
wget https://download.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
</pre>
</syntaxhighlight>


;Alternative direct download for 32-bit systems:
;Alternative direct download for 32-bit systems:
<pre>
<syntaxhighlight lang="bash">
wget https://download.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz
wget https://download.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz
</pre>
</syntaxhighlight>


;Alternative direct download for ARMv6/v7:
;Alternative direct download for ARMv6/v7:
<pre>
<syntaxhighlight lang="bash">
wget https://download.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz
wget https://download.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz
</pre>
</syntaxhighlight>


This alternative URL provides a direct download from voipmonitor.org, avoiding the redirect chain and potential SourceForge-related issues.
This alternative URL provides a direct download from voipmonitor.org, avoiding the redirect chain and potential SourceForge-related issues.
Line 90: Line 90:
Copy the download link for the desired file and use it with the `wget` command from Step 1.
Copy the download link for the desired file and use it with the `wget` command from Step 1.
;Example for version 20.4.4 with the SS7 module:
;Example for version 20.4.4 with the SS7 module:
<pre>
<syntaxhighlight lang="bash">
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz
</pre>
</syntaxhighlight>
Then proceed with the extraction and installation as described above.
Then proceed with the extraction and installation as described above.


=== Installing a Development Build (Manual Upgrade) ===
=== Installing a Development Build (Manual Upgrade) ===
If instructed by the support team, you can manually upgrade to a new development build.
If instructed by the support team, you can manually upgrade to a new development build.
<pre>
<syntaxhighlight lang="bash">
# Create a temporary directory and download the new build
# Create a temporary directory and download the new build
mkdir /tmp/new-sniffer && cd /tmp/new-sniffer
mkdir /tmp/new-sniffer && cd /tmp/new-sniffer
Line 110: Line 110:
cp voipmonitor-*-static/voipmonitor /usr/local/sbin/voipmonitor
cp voipmonitor-*-static/voipmonitor /usr/local/sbin/voipmonitor
systemctl start voipmonitor
systemctl start voipmonitor
</pre>
</syntaxhighlight>


=== Compiling from Source ===
=== Compiling from Source ===
For developers or special use cases, you can compile the sniffer from its source code. This is '''not''' the recommended method for most users.
For developers or special use cases, you can compile the sniffer from its source code. This is '''not''' the recommended method for most users.
;Clone the master branch (stable):
;Clone the master branch (stable):
:<pre>git clone https://github.com/voipmonitor/sniffer.git</pre>
:<syntaxhighlight lang="bash">git clone https://github.com/voipmonitor/sniffer.git</syntaxhighlight>
;Or clone the develop branch (latest features):
;Or clone the develop branch (latest features):
:<pre>git clone -b develop https://github.com/voipmonitor/sniffer.git</pre>
:<syntaxhighlight lang="bash">git clone -b develop https://github.com/voipmonitor/sniffer.git</syntaxhighlight>
Then follow the instructions in the `README` file within the repository.
Then follow the instructions in the `README` file within the repository.


Line 148: Line 148:


=== For systemd-based Systems (Recommended) ===
=== For systemd-based Systems (Recommended) ===
<pre>
<syntaxhighlight lang="bash">
# 1. Stop and disable the service
# 1. Stop and disable the service
systemctl stop voipmonitor
systemctl stop voipmonitor
Line 167: Line 167:
# WARNING: This is irreversible!
# WARNING: This is irreversible!
# rm -rf /var/spool/voipmonitor
# rm -rf /var/spool/voipmonitor
</pre>
</syntaxhighlight>


=== For older SysV-based Systems ===
=== For older SysV-based Systems ===
Run the following commands to stop the service and remove its files:
Run the following commands to stop the service and remove its files:
<pre>
<syntaxhighlight lang="bash">
/etc/init.d/voipmonitor stop
/etc/init.d/voipmonitor stop
update-rc.d voipmonitor remove
update-rc.d voipmonitor remove
Line 177: Line 177:
rm -f /usr/local/sbin/voipmonitor
rm -f /usr/local/sbin/voipmonitor
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup
</pre>
</syntaxhighlight>


== AI Summary for RAG ==
== AI Summary for RAG ==

Revision as of 11:19, 4 January 2026

This guide provides step-by-step instructions for installing the VoIPmonitor sensor (sniffer). The recommended method for all modern Linux distributions is to use the pre-compiled static binary.

Recommended Method: Static Binary Installation

A static binary includes all necessary libraries and is the quickest and most reliable way to get the sensor running on any supported Linux distribution with a kernel version of 2.6.18 or newer.

Step 1: Download the Correct Archive

First, download the latest stable binary for your system's architecture from the official website.

For 64-bit (x86_64) Systems (most common)
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O voipmonitor-sniffer.tar.gz
For 32-bit (i686) Systems
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz -O voipmonitor-sniffer.tar.gz
For ARMv6/v7 (e.g., Raspberry Pi)
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz -O voipmonitor-sniffer.tar.gz

Step 2: Extract and Run the Install Script

The downloaded archive contains an installation script that automates the setup process.

# Extract the archive
tar xzf voipmonitor-sniffer.tar.gz

# Navigate into the newly created directory
# The 'cd voipmonitor-*' command will work regardless of the exact version number
cd voipmonitor-*-static

# Run the installation script with root privileges
./install-script.sh

The `install-script.sh` will:

  • Copy the `voipmonitor` binary to `/usr/local/sbin/`.
  • Copy the default configuration file to `/etc/voipmonitor.conf`.
  • Copy the service startup script to `/etc/init.d/voipmonitor`.
  • Attempt to enable the service to start on boot.

Step 3: Initial Configuration

After the installation, you must edit the main configuration file to connect the sensor to your database and set basic parameters.

nano /etc/voipmonitor.conf

At a minimum, configure your database connection settings and the network interface to monitor.

Step 4: Service Management (systemd)

Modern Linux distributions use `systemd` to manage services. Use the following commands to control the sniffer:

Start the service
systemctl start voipmonitor
Stop the service
systemctl stop voipmonitor
Check the service status
systemctl status voipmonitor
Enable the service to start automatically on boot
systemctl enable voipmonitor

For a more detailed `systemd` service file template and advanced options, please see the systemd guide.

Troubleshooting Download Issues

If the primary download URL hangs or fails (especially on Debian 11/12), this is often caused by issues with the chain of redirects to SourceForge mirrors. In such cases, use the alternative direct download link that bypasses the redirects:

Alternative direct download for 64-bit systems
wget https://download.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
Alternative direct download for 32-bit systems
wget https://download.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz
Alternative direct download for ARMv6/v7
wget https://download.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz

This alternative URL provides a direct download from voipmonitor.org, avoiding the redirect chain and potential SourceForge-related issues.

Advanced & Special Installation Cases

Installing a Specific or Older Version

If you need a specific version (e.g., one that includes the Wireshark SS7 module), you can find historical releases on the VoIPmonitor SourceForge page.

Copy the download link for the desired file and use it with the `wget` command from Step 1.

Example for version 20.4.4 with the SS7 module
wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-sniffer.tar.gz

Then proceed with the extraction and installation as described above.

Installing a Development Build (Manual Upgrade)

If instructed by the support team, you can manually upgrade to a new development build.

# Create a temporary directory and download the new build
mkdir /tmp/new-sniffer && cd /tmp/new-sniffer
wget https://download.voipmonitor.org/some-development-build.tar.gz -O sniffer.tar.gz
tar xzf sniffer.tar.gz

# Stop the current service and back up the old binary
systemctl stop voipmonitor
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup

# Copy the new binary into place and start the service
cp voipmonitor-*-static/voipmonitor /usr/local/sbin/voipmonitor
systemctl start voipmonitor

Compiling from Source

For developers or special use cases, you can compile the sniffer from its source code. This is not the recommended method for most users.

Clone the master branch (stable)
git clone https://github.com/voipmonitor/sniffer.git
Or clone the develop branch (latest features)
git clone -b develop https://github.com/voipmonitor/sniffer.git

Then follow the instructions in the `README` file within the repository.

Example of compiling from the source (e.g. for arm64)

Debian12

apt install git make g++ unixodbc-dev libvorbis-dev libmp3lame-dev libmpg123-dev libpcap-dev libssl-dev libsnappy-dev libcurl4-openssl-dev libicu-dev libpng-dev libjpeg-dev libfftw3-dev libjson-c-dev librrd-dev libglib2.0-dev libxml2-dev libmariadb-dev-compat libmariadb-dev libzstd-dev liblz4-dev liblzma-dev liblzo2-dev gnutls-dev libgcrypt-dev libgoogle-perftools-dev 

cd /usr/src
git clone https://github.com/voipmonitor/sniffer.git
cd sniffer
./configure
make
# if exists old binary
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.static

mv /usr/src/sniffer/voipmonitor /usr/local/sbin/voipmonitor

Add these lines to the config:

upgrade_by_git = yes

git_folder = /usr/src/sniffer

AND restart:

service voipmonitor restart

Uninstallation

To completely remove the VoIPmonitor sensor from a system, follow these steps.

For systemd-based Systems (Recommended)

# 1. Stop and disable the service
systemctl stop voipmonitor
systemctl disable voipmonitor

# 2. Remove the service files and binary
rm -f /etc/systemd/system/voipmonitor.service
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor

# 3. Reload systemd to apply changes
systemctl daemon-reload

# 4. (Optional) Back up and remove the configuration file
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup

# 5. (Optional) Delete the spool directory (contains all captured data)
# WARNING: This is irreversible!
# rm -rf /var/spool/voipmonitor

For older SysV-based Systems

Run the following commands to stop the service and remove its files:

/etc/init.d/voipmonitor stop
update-rc.d voipmonitor remove
rm -f /etc/init.d/voipmonitor
rm -f /usr/local/sbin/voipmonitor
mv /etc/voipmonitor.conf /etc/voipmonitor.conf.backup

AI Summary for RAG

Summary: This guide provides a step-by-step process for installing the VoIPmonitor sensor (sniffer). The primary and recommended method is using the pre-compiled static binary, which involves downloading the correct archive for the system architecture (64-bit, 32-bit, or ARM), extracting it, and running the included `install-script.sh`. The guide details the post-installation steps: editing `/etc/voipmonitor.conf` and managing the service with `systemctl` (start, stop, enable). For download issues on Debian 11/12 or other systems where the primary URL fails or hangs due to SourceForge redirect issues, an alternative direct download URL is available at `https://download.voipmonitor.org/` which bypasses the redirect chain. It also covers advanced scenarios, such as installing a specific older version from SourceForge, manually upgrading to a development build, and compiling from source via `git clone`. Finally, it provides complete uninstallation procedures for both modern `systemd` systems and older `SysV` systems, including commands to remove binaries, configuration files, and service links. Keywords: install, installation, setup, sniffer, sensor, static binary, install-script.sh, download, wget, tar.gz, systemd, systemctl, enable on boot, start service, compile from source, git, development build, upgrade, uninstall, remove, SysV, init.d, arm, x86_64, download issues, redirect, SourceForge, alternative download URL Key Questions:

  • How do I install the VoIPmonitor sniffer?
  • What is the recommended way to install VoIPmonitor?
  • Where can I download the latest static binary for the sensor?
  • What does the `install-script.sh` do?
  • How do I start the voipmonitor service and enable it on boot?
  • How can I install an older version of the sniffer?
  • How do I completely uninstall or remove the VoIPmonitor sensor?
  • What do I do if the wget download hangs or fails on Debian 11/12?
  • What is the alternative direct download URL if the primary URL fails?
  • How to compile the sniffer from source code?

```