The paper for csync2 is a bit unclear to me, when it comes to hosts with different hostnames for two or more interfaces. I often ended up in trying to solve my problem in the following way, that luckily solves my problems without big troubles.
Let’s assume, you have two hosts with their public names test1.suse.de and test2.suse.de, which are also connected via a second network and their hostnames stay more or less the same, but the domain changes: test1.test.suse.de and test2.test.suse.de (yes: this works😉
To avoid confusion and longer try and error setups, I use the following way:
In the /etc/csync2/csync2.cfg file, use the line:
host csync2test1 csync2test2;
…and adapt the xinetd configuration file /etc/xinetd.d/csync2 to use:
server_args = -N csync2test1 -i
server_args = -N csync2test2 -i
according to your hosts.
Now create an alias for your csync2 command line call in ~/.alias (or wherever you like to place such alias definitions – I used the one that is included in SUSE per default here):
alias csync2="csync2 -N csync2test1"
alias csync2="csync2 -N csync2test2"
on the other node.
For keeping it save (and avoid that someone uses this ugly hostname), just also reserve the DNS entry of this new hosts (csync2test1 and csync2test2) in the network you are using to synchronize via csync2.
After restarting your xinetd servers and sourcing the alias file via
everything should work as expected when you call for example csync2 -xv (assuming you followed the rest of the paper correctly).