Re: Connection refused, then connects
Peter Pentchev <[email protected]> Fri, 17 May 2019 10:07:20 +0300
| Newsgroups | gmane.network.stunnel.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 17, 2019 at 01:54:47PM +1000, James Brown wrote:
> Can anyone tell me why It tries ::1:25 first and fails before connecting to 127.0.0.1:25?
>
> 2019.05.17 13:48:34 LOG5[21]: Service [ssmtp465] accepted connection from ::ffff:192.168.1.76:49170
> 2019.05.17 13:48:34 LOG3[21]: s_connect: connect ::1:25: Connection refused (61)
> 2019.05.17 13:48:34 LOG5[21]: s_connect: connected 127.0.0.1:25
> 2019.05.17 13:48:34 LOG5[21]: Service [ssmtp465] connected remote server from 127.0.0.1:56701
>
> /usr/local/etc/stunnel/stunnel.conf has:
>
> [ssmtp465]
> client = no
> accept = 465
> connect = 25
> options = NO_SSLv2
> #transparent = source
You have specified only a port number, not an address; thus, stunnel assumes
the local host address. You have not explicitly told it to only use IPv4
addresses, so it tries the IPv6 local host address (::1) first; when that
fails, it falls back to the IPv4 local host address (127.0.0.1).
If you change the line to "connect = 127.0.0.1:25" like for your other
service, it will go straight to the IPv4 local host address.
Hope that helps!
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----- iQIzBAABCgAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAlzeXZwACgkQZR7vsCUn 3xNRwQ/8DjSU85nzvZmQzQ9nUAmYmHFzChawIEZySgEaymz5ZZnWo5UUD6FRpz+R ufOUVNftXF5/k7jm+82giOvFF/wijR5jk0jHAs7N3JIsGJmXvTcYUr9KJoI/6Y9Q +sxkvDCPHN87PuujDAzetW7EdeHdaK9R9IjiTuwpmkonodrwbt5nnDZS7IsK9byL 209VbNjFT3IeKJIcHucjz0BbfKKrNBAJ4HpwWOjnnQF/rYH/7CGvAOj2Uj3ftByQ ne3VVpRlxGhH40mGkYmgVWnN3qpOtCV1BWTqvcuKezJav+pPFCPcTw3wkkOaZglu ziyGNJeeqCJYNj1Fx/wNhiXpiWxnrRVDJWDp2rc1w89EK+jKmu3JHzk8nNOsc+H6 oMzBeXC9hs5DFp6S6nIUKMl8eRCxpcmK5RNYtZikX6uyCK1K9iaHhsnWlnCkSp8g jR7UoTXahgLvaZjn0/Q5creL04eQe2e0SaUJj2mQgVM/NA3YRheBxHZhkwmhAzp+ 43o/xmFyai1/TmqMfYfWnbo6Nwg48elnU6oF7IfeVQYJ6VRKPzG6iVWnbA5Dq5ri ZgDAkfFPlYGkUhmeicPCr5G/QMYnFSM41g4ElR4kbyS2Wzbn4QiW8HSKjAs+zRvh vr74+r8F/dHsfANXNSis3cI0/cLjybL8gzcqmhBXsVebJsvKe2w= =41uP -----END PGP SIGNATURE-----