Re: Problem with name resolving on Centos 7

Peter Pentchev <[email protected]> Wed, 13 Feb 2019 14:22:58 +0200
Newsgroups gmane.network.stunnel.user
Message-ID <[email protected]>
On Wed, Feb 13, 2019 at 01:12:54PM +0100, Flo Rance wrote:
> Regards,
> Flo
> 
> On Wed, Feb 13, 2019 at 1:00 PM tom <[email protected]> wrote:
> 
> > Hello,
> >
> > > Are you sure 'foobar.remote.site' should resolve?
> > > Does "ping foobar.remote.site" work?
> >
> > yes, the host is resolved on commandline and other services on this
> > system can reach this host.
> >
> >
> > > Do you have a /var/run/stunnel/etc/resolv.conf file?
> >
> > No at this time I dont have this file, but it doesnt change anything
> > if I copy the original from /etc to this lokation. But this brings me
> > to the point try to dissable chroot and in this case stunnel is
> > working as expected. So far so good - there is something wrong in the
> > chroot jail.
> >
> > I try to put it to /var/run/stunnel - no luck, but maybe there are
> > other files missing as well?
> 
> If you want to resolv hostnames using resolv.conf file, you need the
> appropriate library libresolv which is part of libc.
> So you'll need to copy the libc librairies in your chroot environment.

Mmm, I don't think that the resolver libraries are loaded dynamically;
they are usually loaded in the stunnel binary at startup.

However, tom, can you also try copying the /etc/nsswitch.conf file to
the chroot?

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} [email protected]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAlxkDB0ACgkQZR7vsCUn
3xNcNg/7BfX2ylvze6gpfagcKXsc4GQAn/0LUMmJG3AhRpJRnyQ13ZAl4+iAvAQv
zJFRUYuhFI55MaKLVzNWOjGqplsTQP2Bti5tFGFRS/MRTgDavCYlUCWwyvGzzBHt
b8vZZAhcrtBDt8FtdZqSMI3ioLHE/h4IS2hk1R0kb0w8fNRPbVxxBWA1N1bh+bKg
lUYm0iAXhdrjhNmAbeqwpv8hpDntVzEbJOg58i0PI/iVYTvXxNpm1t6pfkAmZxj+
oZVECHK4eoFYWszGRMKbGR4xa6VbGBX3vp12j2tNBiWl/tSv2kyMVdLvH29fPKd3
cv3Y9TPw9xQuOpvkzZAtV5SmcwniVUviy5jVb2o838xzN02VfWb9Ia+w4Zk2rSSp
fY1wWhq8YSXOe5DtkcYU2w7/Yfq07MjJ5Fp9OnVW8dTG4wh5dUZMAK+FFno4kLp6
ac6mZaSEKL00OFmOSHL9xCtGP4YW+pPTlZGhI0Epx4ifnWQIKwZwEFQDSaGb0TiJ
sacxdtpBR+qDEyD3dVrhct3+szHQy8Kt8sisFYkXsqU8j94VYRPB65ebtfLlqmPC
MfLJAAbQtfKsSWN6VSRlNa8dpRQwboan0UbXBvNQjU4NlJmESVFNIoHi8P0+spXl
z+NXvFigx3C8i8reOAcPhrHaDzNaKjDCytF7ei+dARNDhlWJodQ=
=a0iN
-----END PGP SIGNATURE-----