LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 908|回复: 8

大家有没有用openDNS呢?貌似Arch的配置文件结构有点特别。

[复制链接]
发表于 2007-6-4 11:19:16 | 显示全部楼层 |阅读模式
Using OpenDNS with DHCP

If you assign your computer's IP with DHCP, it probably overwrites your /etc/resolv.conf. Here's how to fix that:

   1.      Run: sudo gedit /etc/dhcp3/dhclient.conf

   2.      Change the prepend line to read:

      prepend domain-name-servers 208.67.222.222, 208.67.220.220;

      This will prepend the OpenDNS addresses to the top of the list. (You can also use "supersede", which will just use them.) You don't have to worry about the DHCP client overwriting settings on each reboot or lease cycle, and your ISP nameservers will still be used as backup.

   3.      Run: sudo /etc/init.d/networking restart

第三步我知道是rc.d/network,就不知道dhclient.conf的替代品在哪里?
发表于 2007-6-4 12:33:32 | 显示全部楼层
用了一个多月了,感觉非常好
回复 支持 反对

使用道具 举报

发表于 2007-6-4 15:47:11 | 显示全部楼层
/etc/resolv.conf
回复 支持 反对

使用道具 举报

发表于 2007-6-4 16:42:25 | 显示全部楼层
如果是用ADSL,resolv.conf每次都会被重写,怎么做?
回复 支持 反对

使用道具 举报

发表于 2007-6-4 20:50:50 | 显示全部楼层
现在猫都有路由功能吧? 嘿嘿.....................
回复 支持 反对

使用道具 举报

发表于 2007-6-4 20:57:57 | 显示全部楼层
Post by 狱卒
如果是用ADSL,resolv.conf每次都会被重写,怎么做?


将 /usr/sbin/pppoe-connect 中相关项注释掉,就不会每次拨号都重写resolv.conf了。或者照楼上兄弟说的,设置路由上网。
回复 支持 反对

使用道具 举报

发表于 2007-6-4 22:59:55 | 显示全部楼层
Post by tpxc
现在猫都有路由功能吧? 嘿嘿.....................


我这里没猫,直接一根双绞线拉到我家,用PPPOE拨号。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-5 02:13:13 | 显示全部楼层
Post by wd_afei
/etc/resolv.conf

不是说如果是DHCP,这样就不行吗?我是看opendns说的。
回复 支持 反对

使用道具 举报

发表于 2007-6-5 09:12:32 | 显示全部楼层
opendns比较慢,基本上解析一个域名都得半秒钟
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表