歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Fedora下配置ipv6 dns服務器

Fedora下配置ipv6 dns服務器

日期:2017/2/28 16:20:39   编辑:Linux教程

操作系統:Fedora 14

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

dnsmasq2.52是Fedora 14自帶的,所以我選擇了這個,而且使用起來也很方便,是一種輕量級的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

有什麼疑問請留言!

Copyright © Linux教程網 All Rights Reserved