Welcome! Log In Create A New Profile

Advanced

Re: Should listen *:443 bind to IPv4 and IPv6 ?

Maxim Dounin
June 13, 2018 12:00PM
Hello!

On Wed, Jun 13, 2018 at 05:10:51PM +0200, Ralph Seichter wrote:

> On 13.06.18 14:19, Maxim Dounin wrote:
>
> > The "listen *:443" snippet always created only IPv4 listening socket.
>
> That's interesting. Maybe Gentoo Linux did indeed add a custom patch to
> previous nginx versions.
>
> What is the shortest officially recommended way to bind nginx to port
> 443 for both IPv4 and IPv6? I should probably mention that my servers
> usually service multiple domains using TLS SNI.
>
> server {
> listen *:443 ssl;
> listen [::]:443;
> }
>
> works, but perhaps there is method with just one listen statement?

Using

listen 443 ssl;
listen [::]:443 ssl;

should be good enough.

While it is possible to use just one listen statement with an IPv6
address and "ipv6only=off", I would rather recommend to use an
explicit configuration with two distinct listening sockets.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Should listen *:443 bind to IPv4 and IPv6 ?

Ralph Seichter June 13, 2018 05:02AM

Re: Should listen *:443 bind to IPv4 and IPv6 ?

Maxim Dounin June 13, 2018 08:22AM

Re: Should listen *:443 bind to IPv4 and IPv6 ?

Ralph Seichter June 13, 2018 11:12AM

Re: Should listen *:443 bind to IPv4 and IPv6 ?

Maxim Dounin June 13, 2018 12:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready