GCP负载平衡器不会将其自己的IP重定向到域

发布于 2025-02-09 07:16:09 字数 483 浏览 1 评论 0原文

我已经按照在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

染火枫林 2025-02-16 07:16:09

最简单的方法是将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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文