Change the Private IP address

Change the Private IP address#

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

Introduction#

Suppose you are in the following scenario.

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, that is, when you execute as the zextras user the command zmcontrol status, all services are shown as Running.

Note

If you are on RHEL 9, replace with zmcontrol status with the commands reported in the dedicated systemd box.

When you physically change the IP address (e.g., you change the configuration of the router or switch to serve a new IP to Carbonio), 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:

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.

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

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

Next, restart all Carbonio services. As the zextras user execute

zextras@crb-01:~$ zmcontrol restart

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"
}

Again, restart Carbonio as the zextras user.

zextras@crb-01:~$ zmcontrol restart

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

zextras$ zmcontrol restart