Around emacs, linux, etc.
用adsl时如何使用dnsmasq
前面写过一篇帖子,是关于用dnsmasq做dns缓存的,里面提到的dsl部分采用的是注释掉usepeerdns,这并不是很好用,因为无法获取运营商的dns server
简单的做法是在/etc/ppp/ip-up.d/0000usepeerdns里cat /etc/ppp/resolv.conf前加上一句echo “nameserver 127.0.0.1″ 把那一段变成这样即可。
# merge the new nameservers with the other options from the old configuration
{
echo "nameserver 127.0.0.1"
cat /etc/ppp/resolv.conf
grep --invert-match '^nameserver[[:space:]]' "$REALRESOLVCONF" || true
} > "$REALRESOLVCONF.tmp"
| Print article | This entry was posted by Jay Xie on 2008/10/05 at 8:29 pm, and is filed under GNU/Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |