Tinc can't connect to names defined in /etc/hosts

Guus Sliepen guus at tinc-vpn.org
Mon Mar 13 18:37:10 CET 2017


On Mon, Mar 13, 2017 at 01:20:11PM +0100, Niklas Hambüchen wrote:

> I have a host name defined in /etc/hosts (say "1.2.3.4 host1") that
> resolves via that but not via DNS; consequently pinging and netcatting
> to it works fine.
> 
> When I try to use that in a tinc host definition like "Address = host1",
> tinc 1.1 tells me
> 
>   Error looking up host1 port 655: Name or service not known
> 
> Why is that? Does getaddrinfo() tinc uses not consider /etc/hosts?

Tinc uses the standard getaddrinfo() function from libc. That one does
read /etc/hosts. However, if you run tinc with --chroot, then you have
to make sure you have a copy of /etc/hosts inside the chroot directory.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20170313/e133e759/attachment.sig>


More information about the tinc mailing list