zoukankan      html  css  js  c++  java
  • fedora下配置ipv6 dns服务器

    操作系统:fedora14

    DNS版本:dnsmasq2.52  或者 bind9.x

            dnsmasq2.52是fedora14自带的,所以我选择了这个,而且使用起来也很方便,是一种轻量级的dns server,相对来说bind就比较专业,但是搭建很复杂,我就不介绍了。有兴趣的朋友,可以自己搭建,如果搭建好了并发表了,请留言给我,我给你做链接!谢谢

           这两种都是支持IPv6的,所以无需多去处理。dnsmasq还支持dhcp服务,但一般不用搭理.

    首先,当然是安装了,dnsmasq和bind9.x的安装方式都差不多。就不多说了,分享一个关键点,就是在配置configuer时:

    #./configure --help    //会列出很多编译相关的东西,一般不需要加任何,除非必要的。

                                         //当然如果你知道自己在做什么,你想要得到什么,你可以去加参数,通常只会用到--prefix=you_want_path

                                         //configuer  后如果没有什么错误,就可以开始make和make install 了

    就这么多吧,应该我的这些帖子都是针对一些有基础的linux爱好者,所以没有一步一步按部就班的写了,一来很麻烦,二来也浪费时间。

    其次,配置dnsmasq.conf

    #vi /etc/dnsmasq.conf

    查找并打开修改

    resolv-file=/etc/resolv.dnsmasq.conf  #默认使用的是resolv.conf

    addn-hosts=/etc/dnsmasq.hosts   #默认使用的是hosts

    local=/localnet/

    address=/you.ipv4domain.com/127.0.0.1   #你想给web的域名ipv4

    address=/you.ipv6.domain.com/2001::   #你的web ipv6地址

    #cp /etc/resolv.conf /etc/resolv.dnsmasq.conf

    #vi /etc/resolv.conf

    内容修改为:

    nameserver 127.0.0.1

    nameserver ::1

    #vi /etc/resolv.dnsmasq.conf

    内容修改为:

    nameserver 你本机的ipv4地址

    nameserver 你本机的ipv6地址(用来做web的,不是本地链路地址,是全球单播地址)

    #cp /etc/hosts /etc/dnsmasq.host

    #vi /etc/dnsmasq.host

    增加你的域名和对应的地址,例如:

    192.168.0.3    your.ipv4.com
    2001::3            your.ipv6.com

    最后,就是启动服务了;

    #man dnsmasq    #学会自己找东西

    #/etc/init.d/dnsmasq start

    有什么疑问请留言!

    关于bind配置,还请那位朋友给我留个链接,谢谢....

  • 相关阅读:
    linux shell创建目录、遍历子目录
    linux shell写入单行、多行内容到文件
    如何起个好名字
    linux shell编程中的数组定义、遍历
    详解浏览器分段请求基础——Range,助你了解断点续传基础
    实现一个大文件上传和断点续传
    localStorage设置过期时间
    Python3 __slots__
    Nginx 流量统计分析
    argparse简要用法总结
  • 原文地址:https://www.cnblogs.com/p2liu/p/6048791.html
Copyright © 2011-2022 走看看