Welcome! Log In Create A New Profile

Advanced

ipV6 failing first time, working everytime subsequently

January 05, 2022 10:03PM
Hello,

I am using nginx on a VPS to proxy requests to a GCP server. When working with IPv4, everything works as desired. However, if we enable IPv6 on client machine, we see that the first call (/auth) fails with 401, and all subsequent calls are successful. We cannot see the first call on GCP. I have made sure that AAAA records do exist, GCP endpoint supports IPv6. This is my configuration for Nginx (some values redacted).

server {
listen 80;
listen [::]:80;
server_name xxxxx.us www.xxxxx.us;

location / {
return 301 https://xxxxx.us$request_uri;
}
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name xxxxx.us www.xxxxx.us;
root /var/www/xxxxx.us/html;
index index.html;

# SSL
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
ssl_trusted_certificate chain.pem;

# Security
include options-ssl-nginx.conf;
ssl_dhparam ssl-dhparams.pem;

client_max_body_size 10M;

location / {
proxy_pass https://xxxxx.appspot.com/;
}

location /gcp/ {
proxy_pass https://xxxxx.appspot.com/;
}

Proxy pass /gcp/ is the one we are using for redirecting to GCP. I am always getting the first call as 401, but second call (same), succeeds. Please let me know if you have seen this before and what I can change to fix this. Also, just to reiterate, if we disable IPv6 on the calling machine, there are no issues.



Logs (two subsequent calls):
"POST /gcp/users/auth HTTP/2.0" 401 0 "http://localhost:3000/"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.11
0 Safari/537.36"

"POST /gcp/users/auth HTTP/2.0" 200 606 "http://localhost:3000
/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.
110 Safari/537.36"

Thanks.
Subject Author Posted

ipV6 failing first time, working everytime subsequently

chakras January 05, 2022 10:03PM

Re: ipV6 failing first time, working everytime subsequently

Francis Daly January 06, 2022 06:14PM

Re: ipV6 failing first time, working everytime subsequently

chakras January 06, 2022 09:19PM

Re: ipV6 failing first time, working everytime subsequently

Francis Daly January 07, 2022 03:16AM

Re: ipV6 failing first time, working everytime subsequently

chakras January 07, 2022 12:02PM

Re: ipV6 failing first time, working everytime subsequently

Francis Daly January 07, 2022 04:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
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