在Ubuntu 11.04上将ip更改为/ etc / hosts中的dns

在ubuntu 11.04中,我正在尝试更改dns以强制它指向另一台服务器
我们假设域名是www.mysite.com
和ip 96.32.66.xx

我改变了/ etc / hosts但是当我打开浏览器时它不起作用.

如果我ping 96.32.66.xxx它的工作原理
Windows上我在system32 / drivers / etc / hosts中应用了相同的更改,它的工作原理

这是我的/ etc / hosts:

127.0.0.1   trustweb-Linux   localhost.localdomain   localhost
::1   trustweb-Linux   localhost6.localdomain6   localhost6
127.0.1.1   trustweb-Linux

96.32.66.xxx www.miosito.com

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

我执行此代码来刷新网络缓存

sudo /etc/init.d/networking restart

怎么了?

看看/etc/host.conf.它应该说订单主机,绑定,它告诉它相信/ etc / hosts在它相信dns之前.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...