Change the Private IP address#

This guide helps you in changing the private IP address of a Carbonio infrastructure.

Suppose you are in the following scenario.

Current

New

IP Address

10.0.0.50

192.168.10.50

Subnet

10.0.0.1/24

192.168.10.1/24

You have a Single-Server Carbonio with IP address 10.0.0.50 and subnet 10.0.0.1/24. You need to move it to a different IP in a different subnet and assign it the new IP address 192.168.10.50 (subnet 192.168.10.1/24).

Before starting, make sure that all Carbonio services are in running state.

When you physically change the IP address you will see that almost all Carbonio services are stopped, because they can not bind to the (new) IP address.

To fix the problem, here are the steps to change Carbonio configuration, keeping in mind that:

In all cases, execute also the tasks listed in Section Modify Carbonio VideoServer Configuration.

Modify Network Configuration#

The first step is to edit, as the root user, the /etc/hosts file and replace the old IP with the new IP.

OLD IP
10.0.0.50 crb-01.example.com crb-01

NEW IP
192.168.10.50 crb-01.example.com crb-01

Next, restart all Carbonio services.

As the zextras user, execute

zextras$ zmcontrol restart

As the root user, execute

systemctl restart carbonio.target

As the zextras user, execute

zextras$ zmcontrol restart

As the root user, execute

systemctl restart carbonio.target

After the command completes, you will notice that all services but service-discover (Carbonio Mesh) are running. This is because you need to manually edit its configuration file, /etc/zextras/service-discover/config.json.

As the zextras user, replace in this file the bind_addr, so that the file contains the new IP:

"bind_addr": "192.168.10.50"

Restart the service-discover service:

systemctl restart service-discover.service

Modify MTA Configuration#

In case of a subnet change, it is necessary to regenerate the MTA configuration as well. As the zextras user, verify that the networks on which the MTA operates include the old one (10.0.0.50), for example:

zextras$ postconf mynetworks
mynetworks = 127.0.0.0/8 [::1]/128  10.0.0.50/24

You need to modify that configuration to include the new subnet (192.168.10.1/24) using the command

zextras$ carbonio prov ms crb-01.example.com zimbraMtaMyNetworks \
'127.0.0.0/8 [::1]/128 192.168.10.1/24'

Reload the MTA service

zextras$ postfix reload

Finally, Restart Carbonio

As the zextras user, execute

zextras$ zmcontrol restart

As the root user, execute

systemctl restart carbonio.target

As the zextras user, execute

zextras$ zmcontrol restart

As the root user, execute

systemctl restart carbonio.target

Modify Carbonio VideoServer Configuration#

Edit file /etc/janus/janus.jcfg, search the line with the variable nat_1_1_mapping and replace the value with the new one (192.168.10.50).

nat_1_1_mapping = 192.168.10.50

Note

In a real-world deployment, the value of nat_1_1_mapping is typically a public IP address (used for NAT), rather than a private one as shown in this example.

Multi-node Scenario#

In a multi-node Carbonio infrastructure, changing the private IP address requires additional coordination across all nodes. The procedure must be executed carefully to avoid service disruption.

Preliminary Steps#

Before applying any configuration changes:

  • Update the DNS A records for all Virtual Machines to reflect the new IP addresses.

  • Update the /etc/hosts file on each node with the new IP addresses.

  • Verify network connectivity:

    • Each node must be able to ping all other nodes

    • Each hostname must resolve to the new IP address on every node

Execution Order#

Once the network configuration is consistent across all nodes, proceed with the IP change by following the steps described in this guide.

Important

Apply the changes node by node, starting from the node hosting the Directory Server (LDAP master) component.

After completing the procedure on the Directory Server node, proceed with the remaining nodes.

For each node, apply the steps described in Modify Network Configuration.

Additionally, depending on the node role, perform the following:

Ensure that all services are running correctly on each node before moving to the next one.