GCP负载平衡器不会将其自己的IP重定向到域
我已经按照在 https://cloud.google.com/load-balancing/docs/https/ext-http-lb-tf-module-examples-with_a_backend 。我在DNS提供商处创建了A唱片,并且能够通过域名成功地达到服务。我还为HTTP创建了一个HTTP重定向负载平衡器,仅在访问域名时才会重定向。
但是,我的问题是,我还可以直接访问我的负载平衡器IP Adress上的HTTP,这反过来又将其重定向到我的后端服务,从而使对我服务的不安全访问。我不确定有哪些步骤可以调试我的配置,或者是否有人经历了类似的事情。
I have setup a GCP load balancer following the steps as displayed on https://cloud.google.com/load-balancing/docs/https/ext-http-lb-tf-module-examples#with_a_backend . I have create an A record at my dns provider and I am succesfully able to reach my service through the domain name. I have also created a http to https redirecting load balancer, which only redirects when visiting the domain name.
However my problem is that I can also still directly access my load balancers ip adress over http, which in turn redirects to my backend service thus allowing insecure access to my service. I am not sure what steps there are to debug my configurations or if anyone has experienced something similar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是将HTTP重定向到后端的HTTP。该方法为您提供了更多的选项和控制。
提示:如果客户到达IP地址,您很可能想丢弃该流量。流量通常是黑客,巨魔等。
您还可以在负载平衡器中设置重定向:
设置全局外部http(s)负载均衡器的HTTP-to-HTTPS重定向
The simplest method is to redirect HTTP to HTTPS at your backend. That method provides you with more options and control.
Tip: if the client arrives at an IP address, you most likely want to discard that traffic. That traffic is typically hackers, trolls, etc.
You can also set up a redirect in the load balancer:
Set up an HTTP-to-HTTPS redirect for global external HTTP(S) load balancer