windows - 在 Windows XP 上覆盖本地主机

标签 windows networking

我已经安装了 Windows XP,我想将本地主机从 127.0.0.1 覆盖到另一个地址。我编辑了 ../windows/system32/drivers/etc/hosts,但是 ping localhost 仍然从 127.0.0.1 得到响应。我怎样才能真正改变它?

最佳答案

这是 Windows 主机文件的片段:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

换句话说,localhost 的处理被硬编码到 Windows DNS 堆栈中,您尝试覆盖它的尝试将被忽略。

关于windows - 在 Windows XP 上覆盖本地主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19535094/

相关文章:

android 使用 getUidRxBytes/getUidTxBytes 通过应用程序 (uid) 分离 wifi 和移动数据使用

python - Linux TCP 奇怪的行为

android - 如果使用网络位置提供程序(相对于 GPS),电池功耗是否有优势?

c++ - FTP NLST 仅在某些客户端计算机上导致 '425: Can' t 打开数据连接以进行传输

Python Neupy 安装 : no lapack/blas resources found

javascript - 在Windows 8 (Js/html) APP中显示特定数量的项目

c++ - 如何获取窗口中的显示数量?

sockets - 如何检查 TCP 发送缓冲区的容量以确保数据传递

c++ - VB6 GUI 在多线程 COM 环境中不工作

c - shutdown(2) 系统调用对我不起作用;我不确定我做错了什么