Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist

GitHub: Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist

全球最大的统一 Hosts 文件之一,每日聚合海量恶意域名与 IP,用于系统层面的网络安全防护。

Stars: 1521 | Forks: 168

# The Ultimate Hosts Blacklist - 宇宙中最大的统一 Hosts 文件 ![Ultimate Hosts Blacklist](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/3a0245736c034432.png) The Ultimate Hosts Blacklist (UHB) 毫无疑问是世界上最大的 精选且统一的 hosts 文件之一,旨在保护您的网络、计算机、设备、 儿童或家庭免受数十万恶意行为者的侵害。 我们所有的信息都收集自多个来源,定期测试并 合并成一个巨大的文件,该文件每日更新。 我们的 hosts 几乎可以在所有操作系统上使用,但我们也提供 2 个 DNS 服务器,它们摄取和拦截恶意行为者的效果与 hosts 文件一样好——甚至更好。 | **更新时间** | 每天 :heavy_check_mark: | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **推动者** | [![Hosts File - Ultimate Hosts Blacklist](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6d1cf9ed1e034434.png)](https://github.com/Ultimate-Hosts-Blacklist) | - 版本: **V2.3384.2026.03.03** - `hosts` 文件中的恶意域名总数: **1,240,443** - `hosts.deny` 文件中的恶意 IP 总数: **148,679** - `superhosts.deny` 文件中的恶意域名和 IP 总数: **1,389,122** :exclamation: **是的,您确实没看错这些数字** :exclamation: ## 在哪里报告或讨论问题? 因为我们在 [GitHub organization](https://github.com/Ultimate-Hosts-Blacklist) 内部许多地方工作, 请使用此表了解在哪里讨论或报告问题。 | 操作 | 类型 | 链接平台 | 链接 | | ---------- | -------------- | ------------- | ------------------------------------------------------------------------------------------------ | | Question | general | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/discussions/new) | | Discussion | general | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/discussions/new) | | Issue | general | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/issues/new/choose) | | Question | infrastructure | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/dev-center/discussions/new) | | Discussion | infrastructure | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/dev-center/discussions/new) | | Issue | infrastructure | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/dev-center/issues/new) | | Add | list | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/dev-center/issues/new/choose) | | Remove | list | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/dev-center/issues/new/choose) | | Add | domain | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/blacklist/issues/new/choose) | | Remove | domain | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/whitelist/issues/new/choose) | | Add | IP | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/blacklist/issues/new/choose) | | Remove | IP | GitHub | [:link:](https://github.com/Ultimate-Hosts-Blacklist/whitelist/issues/new/choose) | 对于上述未列出的所有内容,请在[此处](https://github.com/Ultimate-Hosts-Blacklist/issues/new/choose)提交 issue。 ## 列表何时更新? | 时间为 UTC (每天) | 开始 | 结束 | | ---------------------------------------------------------------------------------------------------- | ------- | ------- | | Central Repository (GitHub) | ≈ 19:05 | ≈ 19:15 | | API / Search engine | 19:05 | ≈ 19:20 | | Official Mirror (hosts.ubuntu101.co.za) | 19:30 | ≈ 19:35 | | DNS Server ([#590](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/issues/590)) | 19:30 | ≈ 19:40 | ## DNS 服务器 如果我们所有的文件对于您的设备来说太大而无法摄取,或者您不想 每天晚上考虑更新 `hosts` 文件,您可以使用 我们的 DNS 服务器。 它们**不记录任何内容**并且全天候可用。 有时我们可能需要进行一些维护,需要少于 120 秒的停机时间。 我们**绝不会同时对两台服务器进行停机维护**。 但是,如果您想了解计划停机的时间,请 关注/订阅 [Maintenance Thread](https://github.com/Ultimate-Hosts-Blacklist/dev-center/issues/51)。 **注意:这是推荐给 Windows 用户的方法。** | DNS Name | safedns.allover.co.za | safedns2.allover.co.za | Ports | | -------- | ----------------------- | ----------------------- | ------------ | | IPv4 | `88.198.70.38` | `88.198.70.39` | `53`, `5353` | | IPv6 | `2a01:4f8:140:5021::38` | `2a01:4f8:140:5021::39` | `53`, `5353` | ## 原始文件来源 下面的链接将指向此仓库中 hosts 文件的原始未压缩版本。(文件每日更新) | File Name | Operating System | Format | Official Mirror | | -------------------------- | ---------------- | -------- | -------------------------------------------------------------------- | | hosts | Unix/Linux | UNIX | [Download](https://hosts.ubuntu101.co.za/hosts) | | hosts | Windows | CRLF/DOS | [Download](https://hosts.ubuntu101.co.za/hosts.windows) | | hosts.deny | Unix/Linux | UNIX | [Download](https://hosts.ubuntu101.co.za/hosts.deny) | | superhosts.deny | Unix/Linux | UNIX | [Download](https://hosts.ubuntu101.co.za/superhosts.deny) | | domains.list | Any / Pi-Hole | UNIX | [Download](https://hosts.ubuntu101.co.za/domains.list) | | domains-dotted-format.list | DnsMasq | UNIX | [Download](https://hosts.ubuntu101.co.za/domains-dotted-format.list) | | ips.list | Any / Pi-Hole | UNIX | [Download](https://hosts.ubuntu101.co.za/ips.list) | ## 安装、更新和卸载脚本 **:warning::warning: 我们不建议在 Windows 机器上使用 HOSTS 文件! :warning::warning:** **:warning::warning: 推荐 WINDOWS 用户使用 [DNS 服务器](#dns-server) 代替 :warning::warning:** | Linux | Windows | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | [hosts Installer](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts-installer.sh) | [hosts Installer](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Windows/windows-install-hosts.bat) | | [hosts UnInstaller](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts-uninstaller.sh) | [hosts Updater](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Windows/windows-update-hosts.bat) | | [hosts Updater](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts-updater.sh) | [hosts UnInstaller](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Windows/windows-uninstall-hosts.bat) | | [hosts.deny Installer](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts.deny-installer.sh) | | [hosts.deny UnInstaller](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts.deny-uninstaller.sh) | | [hosts.deny Updater](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-hosts.deny-updater.sh) | | [superhosts.deny Installer](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-superhosts.deny-installer.sh) | | [superhosts.deny UnInstaller](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-superhosts.deny-uninstaller.sh) | | [superhosts.deny Updater](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Linux/linux-superhosts.deny-updater.sh) | ## 什么是 HOSTS 文件? 一个名为 `hosts`(无文件扩展名)的 hosts 文件是一个纯文本文件, 所有操作系统都用它将主机名映射到 IP 地址。 在大多数操作系统中,`hosts` 文件优先于 `DNS`。 因此,如果一个域名由 `hosts` 文件解析, 该请求就不会离开您的计算机。 拥有一个智能的 `hosts` 文件对于阻止恶意软件、广告软件、 勒索软件、色情内容和其他骚扰域名大有帮助。 像这样的 `hosts` 文件会导致对任何列出的域名的任何查找都 解析回您的 localhost,从而防止与 列出的域名建立任何传出连接。 例如,要丢弃对某些域名或服务器的所有请求,在您的 `hosts` 文件中 添加如下行即可为您实现此目的。 您可以创建自定义 hosts,或者直接使用我们的, 它涵盖超过 1,240,443 个恶意域名。 ``` # 使用 Hosts File 屏蔽恶意域名和服务器 0.0.0.0 doubleclick.net 0.0.0.0 18chinese.com 0.0.0.0 gatekeeper.tss.net 0.0.0.0 www.gatekeeper.tss.net 0.0.0.0 cdn.gatekeeper.tss.net 0.0.0.0 youporn.com 0.0.0.0 www.youporn.com 0.0.0.0 x-lime.net 0.0.0.0 www.x-lime.net # etc ... etc .... etc ... ``` 需要注意的是,`hosts` 文件无法理解通配符域名。 因此添加 `0.0.0.0 *.doubleclick.net` 将不起作用。您必须指定 正在使用且图谋不轨的域名的每一个变体。 幸运的是,我们要从超过 几个输入源编译的海量 `hosts` 文件已经为您做到了这一点。所以只需 下载我们的 `hosts` 文件并保持更新, 因为我们会在新威胁出现时每周多次更新 hosts 文件。 ## 关于使用 `0.0.0.0` 而不是 `127.0.0.1` 的建议 大多数 host 文件传统上使用 `127.0.0.1` 作为环回地址, 以建立到本地机器的 IP 连接。 我更喜欢使用 `0.0.0.0`,它被定义为不可路由的元地址。 使用 `0.0.0.0` 也更快,因为无需等待超时解析。 它也不会干扰可能运行在 本地系统上的任何 Web 服务器。 然而,对于许多 Windows 版本,`127.0.0.1` 似乎确实效果稍好 一些,这就是为什么我们的 Windows 版 `hosts` 文件使用 `127.0.0.1` 作为环回地址。 ## 什么是 HOSTS.DENY 文件? 一个名为 `hosts.deny` 的 `hosts` 文件是一个纯文本文件,仅适用于 基于 Linux/Unix 的操作系统,它阻止网络外部的 IP 地址列表 获得对您计算机的任何访问权限。 `hosts.deny` 文件在 Windows 操作系统上不起作用。 ## 什么是 SUPERHOSTS.DENY 文件? **我从来没听说过这种东西 ??** `superhosts.deny` 文件虽然简单地命名为 `superhosts.deny`,但它只是一个 普通的 `hosts.deny` 文件,这是一个用于基于 Linux/Unix 的操作系统的 纯文本文件,它阻止网络外部的 IP 地址或主机(域名)列表 获得对您计算机的任何访问权限。 如果您想使用此 `superhosts.deny` 文件,只需将其重命名为 `hosts.deny` 并将其放置在您的 Linux/Unix 操作系统上的 `/etc/` 文件夹中。 `hosts.deny` 文件在 Windows 操作系统上不起作用。 ## 我该把它放在电脑的什么位置? 要修改您当前的 `hosts` 文件,请在以下位置查找它 并使用文本编辑器进行修改。 **请注意:** 在所有操作系统上,您都需要管理员权限才能 修改 `hosts` 文件。 **Linux, Mac OS X, iOS, Android**: `/etc/hosts` **Linux, Mac OS X, iOS, Android**: `/etc/hosts.deny` **Windows 系统 _(不推荐:首选 DNS SERVER)_**: `%SystemRoot%\system32\drivers\etc\hosts` **[尝试 Windows 安装程序批处理脚本](https://github.com/Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist/blob/master/Installer-Windows/windows-install-hosts.bat)** ## 我们编写的优秀工具 - [UHBW - Ultimate Hosts Blacklist Whitelist](https://pypi.org/project/ultimate-hosts-blacklist-whitelist/) - A - global - whitelisting tool (not limited to our infrastructure). - [UHBIRU - Ultimate Hosts Blacklist Test Launcher](https://pypi.org/project/ultimate-hosts-blacklist-test-launcher/) - The tool to update/test our input source repositories. - [UHBCRU - Ultimate Hosts Blacklist Central Repo Updater](https://pypi.org/project/ultimate-hosts-blacklist-central-repo-updater/) - The tool to update this repository. ## 我们使用的优秀工具 - [PyFunceble](https://github.com/funilrys/PyFunceble) - The tool to check the availability or syntax of domain, IP or URL. ## 其他一些优秀的工具/项目 - [Dead-Hosts](https://github.com/dead-hosts) - [NGINX Ultimate Bad Blocker](https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker) - [Apache Ultimate Bad Bot Blocker](https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker) - [Fail2Ban Blacklist JAIL for Repeat Offenders](https://github.com/mitchellkrogza/Fail2Ban-Blacklist-JAIL-for-Repeat-Offenders-with-Perma-Extended-Banning) - [Phishing Database](https://github.com/mitchellkrogza/Phishing.Database) - [Stop Google Analytics Ghost Spam HOWTO](https://github.com/mitchellkrogza/Stop.Google.Analytics.Ghost.Spam.HOWTO) # 许可证 ``` MIT License Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Ultimate Hosts Blacklist - @Ultimate-Hosts-Blacklist Contributors Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Mitchell Krog - @mitchellkrogza Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Nissar Chababy - @funilrys Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` [⇈ 回到顶部](#the-ultimate-hosts-blacklist---largest-unified-hosts-file-in-the-universe)
标签:Cutter, DNS过滤, Pi-hole, 主机文件, 勒索软件防护, 反钓鱼, 域名黑名单, 威胁情报, 家长控制, 广告拦截, 开发者工具, 开源安全工具, 恶意软件防护, 系统加固, 网络安全, 网络安全, 网络过滤, 逆向工具, 逆向工程平台, 隐私保护, 隐私保护, 黑白名单