问题
I have a website all set up and ready to go in a Docker environment behind an NGINX proxy. I've configured SSL to the website works with http and https, and the website is working over IPv4.
Now I need to add IPv6 support. It seems I can't attach an IPv6 address directly to my VM, I have to create a load balancer. I don't want to use the HTTP(S) load balancer, because that would involve re-doing my whole setup, configuring new certificates for the LB, routines for renewing them etc.
So I've tried creating TCP load balancing, and it was fairly straight-forward for IPv4. However, when I try to create an IPv6 TCP load balancer, I'm forced to create a multi-region/global load balancer. When configuring a global load balancer, I have to select TCP port from a dropdown, and port 80 is not one of the options.
Is it impossible to set up a website working with HTTP, HTTPS, IPv4 and IPv6 using TCP load balancing in GCP? Do I really have to configure a HTTP(S) load balancer?
回答1:
Only global GCP load balancers offer IPv6 termination at this moment.
HTTP(S), SSL proxy and TCPproxy load balancers accept IPv6 connections from clients and then proxy those connections to the backend instances using IPv4. You will find details here.
SSL Proxy load balancer supports ports 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, and 5222.
TCP Proxy load balancer supports the following ports: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222.
Load balancing on port 80 is only provided by the HTTP(S) load balancer.
So in your case, if you want to use port 80 for IPv6 termination, the only option in GCP is to use the HTTP load balancer.
回答2:
Support for HTTP and HTTPS with IPv6 requires the HTTP/S Load Balancer today.
来源:https://stackoverflow.com/questions/52958849/is-there-no-way-to-use-gcp-tcp-load-balancing-and-ipv6-for-a-http-https-website