大网数据广告活动
服务器运维问答

How to find IP of load balancer for a domain?

· 52CE 我爱测

In a firewall do I have to write the IP addresses I need access to. Many sites have a load balancer in front, so I would like to find the IP for it. If I use google.com as an example $ nslookup google.com Server: 172.24.1.131 Add…

问题原文

原帖链接 · Sandra · CC BY-SA 4.0

In a firewall do I have to write the IP addresses I need access to. Many sites have a load balancer in front, so I would like to find the IP for it.

If I use google.com as an example

$ nslookup google.com
Server:     172.24.1.131
Address:    172.24.1.131#53

Non-authoritative answer:
Name:   google.com
Address: 216.58.207.206
Name:   google.com
Address: 2a00:1450:400f:80b::200e

Question

Is 216.58.207.206 the IP of the google.com load balancer or it just the IP of one of the hosts behind the load balancer?

If it is host a work host, how do I find the IP of the load balancer?

已采纳解答

原帖链接 · Tero Kilkanen · CC BY-SA 4.0

For this specific point of time when you made the DNS query, yes, 216.58.207.206 is the IP address where your broser will connect when you go to google.com. It doesn't matter if it is a load balancer or real web server, it is still the address you need to allow.

However, in general, allowing only specific IP addresses doesn't work with the general internet.

  • Web sites often use CDN servers for static assets. The IP addresses for CDN servers will change over time
  • Web sites use multiple discrete servers for serving web page resources. For example, connecting to cnn.com makes web server fetch resources from 30+ domains.
  • Some sites are deployed in environments where their IP address changes on every deployment

In order to make a working allow list in the firewall, you would need to write software that constantly monitors all the resources needed by allowed web sites. The software then would add update the IP addresses in firewall configuration.

In practice, allowing modern web sites by IP addresses is not possible.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-10-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。