Next: , Previous: , Up: Invitations   [Contents][Index]

7.2 Invitation file format

The contents of an invitation file that is generated by the tinc invite command looks like this:

Name = client
Netname = vpn
ConnectTo = server
Name = server
Ed25519PublicKey = augbnwegoij123587...
Address =

The file is basically a concatenation of several host config blocks. Each host config block starts with ‘Name = ...’. Lines that look like ‘#---#’ are not important, it just makes it easier for humans to read the file. However, the first line of an invitation file must always start with ‘Name = ...’.

The first host config block is always the one representing the invitee. So the first Name statement determines the name that the invitee will get. From the first block, the tinc.conf and hosts/client files will be generated; the tinc join command on the client will automatically separate statements based on whether they should be in tinc.conf or in a host config file. Some statements are special and are treated differently:

Netname = <netname>

This is a hint to the invitee which netname to use for the VPN. It is used if the invitee did not already specify a netname, and if there is no pre-existing configuration with the same netname.

Ifconfig = <address[/netmask] | dhcp | dhcp6 | slaac>

This is a hint for generating a tinc-up script. If an address is specified, a command will be added to tinc-up so the VPN interface will be configured to have the given address. If it is the word ‘dhcp’, a command will be added to start a DHCP client on the VPN interface. If it is the word ‘dhcpv6’, it will be a DHCPv6 client. If it is ‘slaac’, then it will add commands to enable IPv6 stateless address autoconfiguration. It is also possible to specify a MAC address, in which case a command will be added to set the MAC address of the VPN interface.

The exact commands added to the tinc-up script depends on the operating system the client is using. Multiple Ifconfig statements can be specified, however one should only use one Ifconfig statement per address family.

Route = <address[/netmask]> [<gateway>]

This is a hint for generating a tinc-up script. Route statements are similar to Ifconfig statements, but add routes instead of addresses. These only allow IPv4 and IPv6 routes. If no gateway address is specified, the route is directed to the VPN interface. In general, a gateway is only necessary when running tinc in switch mode.

Subsequent host config blocks are copied verbatim into their respective files in hosts/. The invitation file generated by tinc invite will normally only contain two blocks; one for the client and one for the server.

Next: , Previous: , Up: Invitations   [Contents][Index]