有没有办法让 YouTube 的所有 IP 地址都被 Windows 防火墙阻止?

发布于 2025-01-06 12:09:19 字数 516 浏览 2 评论 0原文

我想编写自己的防分心工具。我不能/不想使用 hosts 文件 或第三方应用。使用 IPsecWindows 防火墙,它只接受 IP 地址。有

youtube。[264 TLD]
www.youtube。[264 TLD]
subdomains.youtube.[264 TLD]

显然,我们无法再获得 YouTube 子域的完整列表。

除了使用暴力子域 ping 之外,是否有办法以某种方式获取所有 YouTube IP 地址并在 IP 地址级别阻止它们?

I want to programme my own anti-distraction tool. I can not / do not want to use the hosts file or third-party apps. When using IPsec or Windows Firewall, it only accepts IP addresses. There is

youtube.[264 TLD]
www.youtube.[264 TLD]
subdomains.youtube.[264 TLD]

Apparently, there is no way any more to get a complete list of YouTube sub domains.

Is there a way to somehow obtain all YouTube IP addresses and block them on the IP address level other than using brute force subdomain pinging?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

岁吢 2025-01-13 12:09:19

查找与某个 URL 关联的所有 IP 地址的方法首先是查找 AS 编号。您可以在 网络工具中获取它:asinfo 反向 IP 查找、Whois、Ping、RBL 检查、DNS 记录、Traceroute、主机信息

获取

对于 YouTube,请在 Networktools: asinfo youtube.com上 您将获得 AS 编号 (ASN):

主要 ASN:15169

现在,在终端中输入:

whois -h whois.radb.net -- '-i origin AS15169' | grep ^route

然后您将获得所有 IP 地址。该列表很长,但您可以找到可以分组在子网中的类似地址。

The way to find all the IP addresses associated with a URL is first to find the AS Number. You can get it in Networktools: asinfo Reverse IP Lookup, Whois, Ping, RBL Check, DNS Records, Traceroute, Host information.

For YouTube, get it on Networktools: asinfo youtube.com

There you get the AS number (ASN):

Primary ASN : 15169

Now, type this in the terminal:

whois -h whois.radb.net -- '-i origin AS15169' | grep ^route

And there you will get all the IP addresses. The list is long, but you can find similar addresses that can be grouped in a subnet.

池木 2025-01-13 12:09:19

YouTube 当前地址列表为:

  • 64.18.0.0/20
  • 64.233.160.0/19
  • 66.102.0.0/20
  • 66.249.80.0/20
  • 72.14.192.0/18
  • 74.125.0.0/16
  • 173.194.0.0/16
  • 207.126.144.0/20
  • 209.85.128.0/17
  • 216.58.208.0/20
  • 216.239.32.0/19

The YouTube current address list is:

  • 64.18.0.0/20
  • 64.233.160.0/19
  • 66.102.0.0/20
  • 66.249.80.0/20
  • 72.14.192.0/18
  • 74.125.0.0/16
  • 173.194.0.0/16
  • 207.126.144.0/20
  • 209.85.128.0/17
  • 216.58.208.0/20
  • 216.239.32.0/19
孤君无依 2025-01-13 12:09:19

如果您有自己的 DNS 服务器,则可以阻止域名解析。以下是阻止 BIND DNS 服务器。

要获取所有 IP 地址,没有任何方法。您可以安装 dig。它在 Linux 上可用,但在 Windows 上不可用。

然后是时候进入dig youtube.com了。它将显示 DNS 缓存中所有已解析的 IP 地址。

查看我的 dig youtube.com A 结果:

; <<>> DiG 9.7.0-P1 <<>> youtube.com A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13442
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;youtube.com.                   IN      A

;; ANSWER SECTION:
youtube.com.            83      IN      A       74.125.235.47
youtube.com.            83      IN      A       74.125.235.46
youtube.com.            83      IN      A       74.125.235.45
youtube.com.            83      IN      A       74.125.235.44
youtube.com.            83      IN      A       74.125.235.43
youtube.com.            83      IN      A       74.125.235.42
youtube.com.            83      IN      A       74.125.235.41
youtube.com.            83      IN      A       74.125.235.40
youtube.com.            83      IN      A       74.125.235.39
youtube.com.            83      IN      A       74.125.235.38
youtube.com.            83      IN      A       74.125.235.37
youtube.com.            83      IN      A       74.125.235.36
youtube.com.            83      IN      A       74.125.235.35
youtube.com.            83      IN      A       74.125.235.34
youtube.com.            83      IN      A       74.125.235.33
youtube.com.            83      IN      A       74.125.235.32

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Feb 18 22:26:58 2012
;; MSG SIZE  rcvd: 285

If you have your own DNS server you can block domains from resolving. Here is a guide to block domains in a BIND DNS server.

To get all the IP addresses there isn't any way. You can install dig. It's available on Linux, but not on Windows.

Then it is to time enter dig youtube.com. It'll show you all the resolved IP addresses from the DNS cache.

See my result of dig youtube.com A:

; <<>> DiG 9.7.0-P1 <<>> youtube.com A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13442
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;youtube.com.                   IN      A

;; ANSWER SECTION:
youtube.com.            83      IN      A       74.125.235.47
youtube.com.            83      IN      A       74.125.235.46
youtube.com.            83      IN      A       74.125.235.45
youtube.com.            83      IN      A       74.125.235.44
youtube.com.            83      IN      A       74.125.235.43
youtube.com.            83      IN      A       74.125.235.42
youtube.com.            83      IN      A       74.125.235.41
youtube.com.            83      IN      A       74.125.235.40
youtube.com.            83      IN      A       74.125.235.39
youtube.com.            83      IN      A       74.125.235.38
youtube.com.            83      IN      A       74.125.235.37
youtube.com.            83      IN      A       74.125.235.36
youtube.com.            83      IN      A       74.125.235.35
youtube.com.            83      IN      A       74.125.235.34
youtube.com.            83      IN      A       74.125.235.33
youtube.com.            83      IN      A       74.125.235.32

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Feb 18 22:26:58 2012
;; MSG SIZE  rcvd: 285
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文