How to enable ipv6 processing: Difference between revisions

From VoIPmonitor.org
(Add guide for enabling IPv6 support with migration warnings)
 
(Improved formatting: syntax highlighting, proper MediaWiki markup, fixed incomplete step, removed emoji from header, added warning box)
Line 1: Line 1:
= How to Enable IPv6 Processing =
{{DISPLAYTITLE:How to Enable IPv6 Processing}}


This guide explains how to enable IPv6 support in VoIPmonitor, covering both new installations and existing IPv4-formatted databases.
This guide explains how to enable IPv6 support in VoIPmonitor, covering both new installations and existing IPv4-formatted databases.
Line 7: Line 7:
For a fresh VoIPmonitor installation, simply enable IPv6 before starting the service for the first time:
For a fresh VoIPmonitor installation, simply enable IPv6 before starting the service for the first time:


<code>ipv6=yes</code>
<syntaxhighlight lang="ini">
ipv6 = yes
</syntaxhighlight>


in your `voipmonitor.conf` file. The database will be created with IPv6 columns from the beginning.
Add this to your <code>/etc/voipmonitor.conf</code> file. The database will be created with IPv6 columns from the beginning.


== Enabling IPv6 on Existing Installations ==
== Enabling IPv6 on Existing Installations ==
Line 17: Line 19:
=== Step 1: Enable IPv6 in Configuration ===
=== Step 1: Enable IPv6 in Configuration ===


Add or modify the following line in `/etc/voipmonitor.conf`:
Add or modify the following line in <code>/etc/voipmonitor.conf</code>:


<code>ipv6=yes</code>
<syntaxhighlight lang="ini">
ipv6 = yes
</syntaxhighlight>


=== Step 2: Run the Migration Script ===
=== Step 2: Run the Migration Script ===


The migration script `ipv6_alter.sql` adds the necessary IPv6 columns to your database tables. Locate and run this script:
The migration script <code>ipv6_alter.sql</code> adds the necessary IPv6 columns to your database tables. Locate and run this script:


*Location:* Typically found in the scripts directory of your VoIPmonitor installation, such as `/usr/share/voipmonitor/scripts/` or `/var/www/html/scripts/`.
;Location
:Typically found in the scripts directory of your VoIPmonitor installation, such as <code>/usr/share/voipmonitor/scripts/</code> or <code>/var/www/html/scripts/</code>.


<b>Important: Backup your database before running any schema migration!</b>
{| style="width:100%; border:1px solid #c00; background-color:#fee;"
|-
| '''Warning:''' Backup your database before running any schema migration!
|}


<code>mysql -u root -p voipmonitor &lt; /path/to/scripts/ipv6_alter.sql</code>
<syntaxhighlight lang="bash">
mysql -u root -p voipmonitor < /path/to/scripts/ipv6_alter.sql
</syntaxhighlight>


=== Step 3: Restart the Service ===
=== Step 3: Restart the Service ===


<code>systemctl restart voipmonitor</code>
<syntaxhighlight lang="bash">
systemctl restart voipmonitor
</syntaxhighlight>


=== Verification ===
=== Verification ===
Line 39: Line 51:
After the service restarts, VoIPmonitor will begin logging IPv6 addresses for calls involving IPv6 endpoints. You can verify this by checking the CDR view for calls with IPv6 addresses.
After the service restarts, VoIPmonitor will begin logging IPv6 addresses for calls involving IPv6 endpoints. You can verify this by checking the CDR view for calls with IPv6 addresses.


== Important Considerations for Existing Databases <b>⚠️</b> ==
== Important Considerations for Existing Databases ==


=== Performance and Time ===
=== Performance and Time ===


* The migration process can be<b> very time-consuming</b> for large databases with millions of CDRs
* The migration process can be '''very time-consuming''' for large databases with millions of CDRs
* The `ipv6_alter.sql` script adds columns to multiple tables, which requires copying existing data
* The <code>ipv6_alter.sql</code> script adds columns to multiple tables, which requires copying existing data
* During migration, the database may experience performance degradation
* During migration, the database may experience performance degradation


Line 50: Line 62:


* Converting existing IPv4 entries cannot retroactively convert them to IPv6 format
* Converting existing IPv4 entries cannot retroactively convert them to IPv6 format
* Historical statistics and reports may display<b> inaccuracies</b> after the migration, as pre-migration data will have NULL values in IPv6 columns
* Historical statistics and reports may display '''inaccuracies''' after the migration, as pre-migration data will have NULL values in IPv6 columns
* Some aggregations or filters may behave unexpectedly with the mixed IPv4/IPv6 data
* Some aggregations or filters may behave unexpectedly with the mixed IPv4/IPv6 data


=== Recommended Approach: Fresh Database ===
=== Recommended Approach: Fresh Database ===


<b>For most production environments, we recommend starting with a fresh database instead of migrating:</b>
For most production environments, we recommend starting with a fresh database instead of migrating:


# Export or back up any data you need to preserve (raw PCAPs, reports, etc.)
# Export or back up any data you need to preserve (raw PCAPs, reports, etc.)
# Use the GUI's<b> "Tools → Backup & Restore → Configuration TABLES"</b> feature to save your GUI settings, alerts, user permissions, and other configuration
# Use the GUI's '''Tools → Backup & Restore → Configuration TABLES''' feature to save your GUI settings, alerts, user permissions, and other configuration
# Flush or drop the old VoIPmonitor database
# Flush or drop the old VoIPmonitor database
# Recreate it from scratch with `ipv6=yes` enabled
# Recreate it from scratch with <code>ipv6 = yes</code> enabled
# Restore your GUI configuration tables from the backup
# Restore your GUI configuration tables from the backup


Line 69: Line 81:
When resetting the database, you can preserve your GUI configuration:
When resetting the database, you can preserve your GUI configuration:


1. Access the VoIPmonitor GUI web interface
# Access the VoIPmonitor GUI web interface
2. Navigate to <b>Tools → Backup & Restore</b>
# Navigate to '''Tools → Backup & Restore'''
3. Select <b>Backup configuration TABLES</b>
# Select '''Backup configuration TABLES'''
4. Save the backup file to a safe location
# Save the backup file to a safe location
5. After creating the new database and ensuring `ipv6=yes` is set
# Create the new database with <code>ipv6 = yes</code> enabled
6. Use <b>Restore configuration TABLES</b> to reapply your settings
# Use '''Restore configuration TABLES''' to reapply your settings


This restores:
This restores:
Line 83: Line 95:
* Custom capture rules
* Custom capture rules


Note: This does <b>not</b> restore CDR data or PCAP files—those must be backed up separately if needed.
Note: This does '''not''' restore CDR data or PCAP files—those must be backed up separately if needed.


== Related Documentation ==
== Related Documentation ==


* [[Sniffer_configuration|Complete Configuration Reference]] for all voipmonitor.conf options
* [[Sniffer_configuration|Complete Configuration Reference]] for all voipmonitor.conf options
* [[FAQ|FAQ]] for common troubleshooting questions
* [[FAQ]] for common troubleshooting questions
* [[Data_Cleaning|Data Cleaning and Retention]] for managing database size and cleanup
* [[Data_Cleaning|Data Cleaning and Retention]] for managing database size and cleanup


== AI Summary for RAG ==
== AI Summary for RAG ==
'''Summary:''' This guide covers enabling IPv6 support in VoIPmonitor. For new installations, set `ipv6=yes` before first start. For existing systems with IPv4-only databases, run `/var/www/html/scripts/ipv6_alter.sql` to add IPv6 columns. The migration is time-consuming and may cause historical statistics inaccuracies. The recommended approach for most production environments is to flush the old database, start fresh with `ipv6=yes`, and use "Tools → Backup & Restore → Configuration TABLES" to preserve GUI settings.
'''Summary:''' This guide covers enabling IPv6 support in VoIPmonitor. For new installations, set <code>ipv6 = yes</code> in voipmonitor.conf before first start. For existing systems with IPv4-only databases, run the <code>ipv6_alter.sql</code> migration script. The migration is time-consuming for large databases and may cause historical statistics inaccuracies. The recommended approach for production environments is to flush the old database, start fresh with IPv6 enabled, and use "Tools → Backup & Restore → Configuration TABLES" to preserve GUI settings.
'''Keywords:''' ipv6, ipv6_enable, migration, database migration, ipv6_alter.sql, historical data, configuration backup, gui settings, database flush
 
'''Keywords:''' ipv6, ipv6 enable, migration, database migration, ipv6_alter.sql, historical data, configuration backup, gui settings, database flush
 
'''Key Questions:'''
'''Key Questions:'''
* How do I enable IPv6 on a new VoIPmonitor installation?
* How do I enable IPv6 on a new VoIPmonitor installation?
* How do I enable IPv6 on an existing IPv4-only VoIPmonitor installation?
* How do I enable IPv6 on an existing IPv4-only VoIPmonitor installation?
* What is the `ipv6_alter.sql` migration script?
* What is the ipv6_alter.sql migration script?
* Why might migration be problematic for existing databases?
* Why might migration be problematic for existing databases?
* How can I preserve my GUI settings when recreating a database?
* How can I preserve my GUI settings when recreating a database?
* What are the risks of running the IPv6 migration on a large database?

Revision as of 20:04, 4 January 2026


This guide explains how to enable IPv6 support in VoIPmonitor, covering both new installations and existing IPv4-formatted databases.

Quick Start for New Installations

For a fresh VoIPmonitor installation, simply enable IPv6 before starting the service for the first time:

ipv6 = yes

Add this to your /etc/voipmonitor.conf file. The database will be created with IPv6 columns from the beginning.

Enabling IPv6 on Existing Installations

If you have an existing VoIPmonitor installation that was set up with only IPv4 addresses, enabling IPv6 requires a database schema migration.

Step 1: Enable IPv6 in Configuration

Add or modify the following line in /etc/voipmonitor.conf:

ipv6 = yes

Step 2: Run the Migration Script

The migration script ipv6_alter.sql adds the necessary IPv6 columns to your database tables. Locate and run this script:

Location
Typically found in the scripts directory of your VoIPmonitor installation, such as /usr/share/voipmonitor/scripts/ or /var/www/html/scripts/.
Warning: Backup your database before running any schema migration!
mysql -u root -p voipmonitor < /path/to/scripts/ipv6_alter.sql

Step 3: Restart the Service

systemctl restart voipmonitor

Verification

After the service restarts, VoIPmonitor will begin logging IPv6 addresses for calls involving IPv6 endpoints. You can verify this by checking the CDR view for calls with IPv6 addresses.

Important Considerations for Existing Databases

Performance and Time

  • The migration process can be very time-consuming for large databases with millions of CDRs
  • The ipv6_alter.sql script adds columns to multiple tables, which requires copying existing data
  • During migration, the database may experience performance degradation

Impact on Historical Data

  • Converting existing IPv4 entries cannot retroactively convert them to IPv6 format
  • Historical statistics and reports may display inaccuracies after the migration, as pre-migration data will have NULL values in IPv6 columns
  • Some aggregations or filters may behave unexpectedly with the mixed IPv4/IPv6 data

Recommended Approach: Fresh Database

For most production environments, we recommend starting with a fresh database instead of migrating:

  1. Export or back up any data you need to preserve (raw PCAPs, reports, etc.)
  2. Use the GUI's Tools → Backup & Restore → Configuration TABLES feature to save your GUI settings, alerts, user permissions, and other configuration
  3. Flush or drop the old VoIPmonitor database
  4. Recreate it from scratch with ipv6 = yes enabled
  5. Restore your GUI configuration tables from the backup

This approach avoids migration time, eliminates potential data inconsistencies, and ensures clean IPv6 operation going forward.

Preserving GUI Settings

When resetting the database, you can preserve your GUI configuration:

  1. Access the VoIPmonitor GUI web interface
  2. Navigate to Tools → Backup & Restore
  3. Select Backup configuration TABLES
  4. Save the backup file to a safe location
  5. Create the new database with ipv6 = yes enabled
  6. Use Restore configuration TABLES to reapply your settings

This restores:

  • User accounts and permissions
  • Alert rules and email notifications
  • Dashboard configurations
  • GUI settings and preferences
  • Custom capture rules

Note: This does not restore CDR data or PCAP files—those must be backed up separately if needed.

Related Documentation

AI Summary for RAG

Summary: This guide covers enabling IPv6 support in VoIPmonitor. For new installations, set ipv6 = yes in voipmonitor.conf before first start. For existing systems with IPv4-only databases, run the ipv6_alter.sql migration script. The migration is time-consuming for large databases and may cause historical statistics inaccuracies. The recommended approach for production environments is to flush the old database, start fresh with IPv6 enabled, and use "Tools → Backup & Restore → Configuration TABLES" to preserve GUI settings.

Keywords: ipv6, ipv6 enable, migration, database migration, ipv6_alter.sql, historical data, configuration backup, gui settings, database flush

Key Questions:

  • How do I enable IPv6 on a new VoIPmonitor installation?
  • How do I enable IPv6 on an existing IPv4-only VoIPmonitor installation?
  • What is the ipv6_alter.sql migration script?
  • Why might migration be problematic for existing databases?
  • How can I preserve my GUI settings when recreating a database?