Files
cunicu/docs/features/hsync.md
Steffen Vogel 3bee839348 fix: Update copyright years
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2025-01-01 22:45:39 +01:00

1.6 KiB

Hosts-file Synchronization

The hosts-file synchronization updates your local hosts(5) file (/etc/hosts) with entries for each peer.

As hostname, cunicu uses the first 8 characters of the Base64-encoded public key as well as an optional hostname. This optional hostname can either be configured by the user in the configuration file or is discovered via the peer-discovery feature.

Example

The following snippet shows the local hosts file of an Ubuntu 20.04 system with two entries added by cunicu. As shown here, all entries managed by cunicu are marked with a comment prefixed with # cunicu:

127.0.0.1 localhost
127.0.1.1 ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

fe80::13a9:c799:cead:4f28 buxfBfaN.wg-local fra-1.wg-local # cunicu: ifname=wg0, ifindex=9, pk=buxfBfaNZI8UFT0cB1aj9YanhbLfxlTfd/hH3DrGaFA=
fe80::1fed:fabb:a9f6:d78 ZEki/XKE.wg-local # cunicu: ifname=wg1, ifindex=10, pk=ZEki/XKEsqdjFyURo5Sm+g3vXSKJKpV5WmwWKAQqo2c=

Configuration

The following settings can be used in the main section of the configuration file or with-in the interfaces section to customize settings of an individual interface.

import ApiSchema from '@theme/ApiSchema';