Re: [Csync2] Dynamic master ip...

2020-03-23 Thread Lars Ellenberg
On Mon, Mar 23, 2020 at 11:57:11AM +0100, Marco Gaiarin wrote:
> 
> In this time of Coronavirus, i've switched to 'smart working'.
> 
> I've setup a set of csync2 config file to propagate some sets of config
> files to a bunch of servers. Eg:
> 
> host hermi...@hermione.sv.lnf.it;
> 
> host (t...@tank.sv.lnf.it);
> host (invernom...@invernomuto.sv.lnf.it);
> host (l...@link.sv.lnf.it);
>   [...]
> 
> But now my IP change, or it is not anymore 'hermione.sv.lnf.it'.
> 
> 
> There's some way to have a 'floating master host'? And this can be
> achived NOT passing every 'slave' server to change local csync2 config
> file?

This is how csync2 "authenticates" a peer:
it does a "forward lookup" (getaddrinfo) of the name the peer claims to be,
and checks if the address as returned by getpeername() on the connected
socket is listed in the results (and if that name is listed in the config).

If that IP changes all the time, you probably have to use dynamic DNS.
Or use some VPN, inside of which you then have your own, "static" IPs.

You can try to add the "expected" (by you) info to /etc/hosts,
if that makes sense in your context.

Or, of course, change csync2 to not do this "forward lookup of claimed
name lists peer address" sanity check. Though I'm not convinced that
would be a good idea.

hth,

Lars

___
Csync2 mailing list
Csync2@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/csync2


[Csync2] Dynamic master ip...

2020-03-23 Thread Marco Gaiarin


In this time of Coronavirus, i've switched to 'smart working'.

I've setup a set of csync2 config file to propagate some sets of config
files to a bunch of servers. Eg:

host hermi...@hermione.sv.lnf.it;

host (t...@tank.sv.lnf.it);
host (invernom...@invernomuto.sv.lnf.it);
host (l...@link.sv.lnf.it);
[...]

But now my IP change, or it is not anymore 'hermione.sv.lnf.it'.


There's some way to have a 'floating master host'? And this can be
achived NOT passing every 'slave' server to change local csync2 config
file?


Thanks.

-- 
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''  http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
  http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

___
Csync2 mailing list
Csync2@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/csync2