Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipv4 support #114

Open
plessbd opened this issue Nov 2, 2015 · 3 comments
Open

ipv4 support #114

plessbd opened this issue Nov 2, 2015 · 3 comments

Comments

@plessbd
Copy link

plessbd commented Nov 2, 2015

I was wondering what people thought of changing from just port 80 to 8080 to actually be [::]:8080 or adding ipv6only=off

I ran into this issue and so have others #113.
the reason:
http://serverfault.com/questions/638367/do-you-need-separate-ipv4-and-ipv6-listen-directives-in-nginx/638370#638370

or maybe a caveat when trying to use localhost as it seems to not work...

@denji
Copy link
Owner

denji commented Nov 2, 2015

ipv6only=off is not really listen/bind-ip, filter the source-ip-address in ipv6 segment.

  • Dual Stack Protocol (IPv4+IPv6) over [ipv6/ipv4] – ipv4 traffic is forwarded on ipv6 and back

Port 80 may require root privileges and is probably going to be already binding. By default, we use changed port 8080 https://github.com/Homebrew/homebrew-nginx/blob/master/Formula/nginx-full.rb#L169

@denji
Copy link
Owner

denji commented Nov 2, 2015

Changes with nginx 1.3.4                                         31 Jul 2012

    *) Change: the "ipv6only" parameter is now turned on by default for
       listening IPv6 sockets.

Do you want to pass ipv4 traffic over ipv6? Don't mind if it will be good for all.

server {
  listen 8080; # all interfaces bind (ipv4/ipv6 (--with-ipv6))
  listen 0.0.0.0:8080; # all interfaces ipv4 bind
  listen [::]:8080; # all interfaces ipv6 bind

  listen 8080 ipv6only=off; # all interfaces bind (ipv4/ipv6 (--with-ipv6)),
                            # disabled filtering receiving from the client ipv4 over ipv6
}

@plessbd
Copy link
Author

plessbd commented Nov 2, 2015

I was thinking of changing that line to allow it to be both ipv4 and ipv6, yes.
I use port 80 but understand making it port 8080 it just doesnt work for trying to do localhost:8080 with the current setup.

I would be fine with passing ipv4 over ipv6 or just putting in a caveat that lets people decide on their own how they want to do it, as long as we can give enough information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants