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:

In all cases, execute also the tasks listed in Sections Modify Preview Component Configuration and 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.

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

Modify Preview Component Configuration#

Edit file /etc/carbonio/preview/config.ini and replace the values of variables nginx_lookup_servers_full_path_urls and memcached_server_full_path_urls with the new IP address (192.168.10.50) ones.

nginx_lookup_server_full_path_urls = https://192.168.10.50:7072
memcached_server_full_path_urls = 192.168.10.50:11211

In case you have multiple Proxy Nodes, add the IP addresses of all Proxy Nodes as a comma-separated list, for example (assuming 192.168.10.51 is the second Proxy Node’s IP).

Note

In case you have a Multi-Server infrastructure, replace the 192.168.10.50 IP address in the snippets below with the correct IP addresses, corresponding to the Proxy Node’s IP address(es).

nginx_lookup_server_full_path_urls = https://192.168.10.50:7072,https://192.168.10.51:7072
memcached_server_full_path_urls = 192.168.10.50:11211,192.168.10.51:11211

See also

More information in Section Configure Memcached

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