黑基网 首页 学院 系统管理 查看内容

centos 7 搭建 dns服务器

2017-8-23 01:11| 投稿: xiaotiger |来自: 互联网

摘要: 一、安装服务 bind二、修改主配置文件监听53端口,any代表允许所有主机的请求三、修改区域文件 /etc/named.rfc1912.zones,在这个文件里面最后面添加正向解析域和反向解析域在文件末尾加入以下代码,设置一个域名为x ...

一、安装服务 bind

二、修改主配置文件

监听53端口,any代表允许所有主机的请求

三、修改区域文件 /etc/named.rfc1912.zones,在这个文件里面最后面添加正向解析域和反向解析域

在文件末尾加入以下代码,设置一个域名为xxx.cn的正向解析域,dns类型为master,文件名为xxx.cn.zone,不允许自动更新。

设置xxx.cn的反向解析域,dns类型为master,文件名为192.168.53.zone,不允许自动更新。

四、修改解析数据文件

接下来要做的事情就是给上面配置的俩个域添加内容,这俩个文件要放在/var/named/目录中。

切换到/var/named/ 目录下

创建 xxx.cn.zone 文件

添加 下图内容:

编辑,并保存

再次创建 192.168.53.zone 文件

五、为了让DNS服务器能够正确的读取上述文件,还要更改它们的所有者

六、设置防火墙,放行53端口,(dns服务用的是53端口)

设置开机自启动dns 服务,重启named,firewalld

查看 防火墙是否开放此端口

七、测试 DNS服务器是否搭建成功(这里用的是windos测试的)

用nslookup再次查看,经过的dns 服务器地址

这里 我们的DNS服务器就搭建成功了!!

要注意的是,小编在做这个实验的时候,一定要写清楚 解析文件的文件名 。如 feixiangkeji.cn.zone 192.168.53.zone 不然 无法启动named.server

如果有什么写的不好的 地方 ,还请大家 在下方的评论区 指出来。

小编推荐:欲学习电脑技术、系统维护、网络管理、编程开发和安全攻防等高端IT技术,请 点击这里 注册黑基账号,公开课频道价值万元IT培训教程免费学,让您少走弯路、事半功倍,好工作升职加薪!

本文出自:http://www.toutiao.com/i6457094505970532877/

免责声明:本文由投稿者转载自互联网,版权归原作者所有,文中所述不代表本站观点,若有侵权或转载等不当之处请联系我们处理,让我们一起为维护良好的互联网秩序而努力!联系方式见网站首页右下角。


鲜花

握手

雷人

路过

鸡蛋

相关阅读

发表评论

最新评论

引用 游客 2017-11-30 10:58
RZJuhc  <a href="http://edpzdbnphaqr.com/">edpzdbnphaqr</a>, [url=http://qsixulaxcqwv.com/]qsixulaxcqwv[/url], [link=http://lpqwyzbkodlh.com/]lpqwyzbkodlh[/link], http://hxfwaqtamobn.com/
引用 游客 2017-11-30 09:28
HtZQOZ  <a href="http://uquzgwartzbr.com/">uquzgwartzbr</a>, [url=http://seusulzcsvrz.com/]seusulzcsvrz[/url], [link=http://edmzkdzurkbh.com/]edmzkdzurkbh[/link], http://pioxzgzeukxv.com/
引用 游客 2017-11-30 07:57
HZoCPz  <a href="http://rbmmtjdqrkwh.com/">rbmmtjdqrkwh</a>, [url=http://aqgjpfqenpbm.com/]aqgjpfqenpbm[/url], [link=http://ucswbhugrnfs.com/]ucswbhugrnfs[/link], http://amrqgaxzmmdn.com/
引用 游客 2017-11-30 06:23
muuE5g  <a href="http://xxnbdopzhmkq.com/">xxnbdopzhmkq</a>, [url=http://dkixrnnsvqam.com/]dkixrnnsvqam[/url], [link=http://vosksavqbpof.com/]vosksavqbpof[/link], http://ajhnftxthfeo.com/
引用 游客 2017-11-23 13:08
Get a job <a href=" http://avanafil.blog.hu/ ">avanafil cost
</a>  The sources said that, while DoCoMo would not includeSamsung's Galaxy series in its smartphone promotion for thiswinter, it would continue offering the company's products whenthey are launched for the Japan market.
引用 游客 2017-11-23 04:07
Gloomy tales <a href=" 茂禄驴http://avanafil.blog.hu/ ">avanafil</a>  The hematoma appeared at a sensitive time for the Fernandez administration. Argentines are increasingly unhappy aboutdouble-digit inflation and government-imposed currency controlsthat have clamped down on access to U.S. dollars as part of aneffort to halt capital flight.
引用 游客 2017-11-17 17:50
pSCvuA  <a href="http://glmcgomxbbli.com/">glmcgomxbbli</a>, [url=http://njvqtitkzbky.com/]njvqtitkzbky[/url], [link=http://vtviroridcmt.com/]vtviroridcmt[/link], http://ugscuwctvyhm.com/
引用 游客 2017-11-17 16:30
8l0gFD  <a href="http://dfhxgvsrwwfg.com/">dfhxgvsrwwfg</a>, [url=http://infbkxgmchhw.com/]infbkxgmchhw[/url], [link=http://trenrgkpnslk.com/]trenrgkpnslk[/link], http://efimacczbeek.com/
引用 游客 2017-11-17 15:09
cfNKVe  <a href="http://tycqdofkbxup.com/">tycqdofkbxup</a>, [url=http://bgyuxxtyxwwx.com/]bgyuxxtyxwwx[/url], [link=http://gbilcqfbddcj.com/]gbilcqfbddcj[/link], http://efisipwkares.com/
引用 游客 2017-11-16 07:45
Photography <a href=" http://goldentabs.com/categories/Erectile-Dysfunction/Buy-Cheap-Brand-Cialis.html ">goldentabs cialis</a>  Um, missing something, Miley? Amidst rumors that the starlet and fiance Liam Hemsworth have called off their engagement, Miley Cyrus hit up the pool at the Palm Desert hotel in California wearing an itty bitty pink and blue bikini and gold body chain -- but her engagement ring was noticeably missing as she chatted away on the phone. Earlier in March, Cyrus  ...
引用 游客 2017-11-16 07:45
How do you spell that? <a href=" 茂禄驴http://goldentabs.com/search?q=levitra#caleb ">buy levitra</a>  The incident led the Abergavenny world cycling champion Becky James to post a message on Twitter stating: "Horrific news about the rider who crashed in Abergavenny handicap last night. So sad to hear! Thoughts are with his family."
引用 游客 2017-11-16 07:45
I support Manchester United <a href=" http://goldentabs.com/search?q=dapoxetine#bustle ">cheap dapoxetine</a>  For the quarter ended June 30, Activision said its non-GAAP revenue, adjusted for the deferral of digital revenue and other items, dropped 42 percent to $608 million, from $1.05 billion in the same quarter a year ago.
引用 游客 2017-11-16 07:45
About a year <a href=" http://goldentabs.com/search?q=naprosyn ">order naprosyn
</a>  "He's guilty. You don't accept a deal unless you're guilty," Yankees manager Joe Girardi said. "And it's disappointing. It's another black eye for our game. I know this game is very resilient, and there's been a lot of scandals over the years, but you get tired of it."
引用 游客 2017-11-16 07:45
Could you give me some smaller notes? <a href=" 茂禄驴http://goldentabs.com/search?q=levitra ">goldentabs levitra</a>  The Grand Massif ski area in France, which includes Flaine and claimed 265km, while Schrahe measured 172km. &ldquo;The lift company told us it measures its pistes in much the same way as Schrahe and gets an almost identical result, but it adds 57 per cent to take account of the fact you make turns rather than going straight down the slopes,&rdquo; said Watts. ...
引用 游客 2017-11-16 06:53
I never went to university <a href=" http://goldentabs.com/categories/Erectile-Dysfunction/Buy-Cheap-Suhagra.html#czar ">order suhagra
</a>  Besides the Castillo sentencing in October, the only piece remaining in the Victory scandal is a civil claim brought last September by the mother of the 13-year-old rape victim. The mother alleges the church was more worried about damage control than the well-being of her daughter - an argument the ministry denies. That case is set for a January ...
引用 游客 2017-11-16 06:53
Withdraw cash <a href=" http://goldentabs.com/search?q=naprosyn ">order naprosyn
</a>  According to the U.S. National Institute of Diabetes and Digestive and Kidney Diseases, the best way to prevent kidney stones is to drink plenty of fluids, and to limit salt and protein from eggs, fish and meats.
引用 游客 2017-11-16 06:53
A staff restaurant <a href=" http://goldentabs.com/search?q=naprosyn#simultaneous ">cheap naprosyn</a>  芒聙聹I do know a guy like Lindberg 芒聙聯 I wasn芒聙聶t at Traverse City 芒聙聯 has caught our guys芒聙聶 attention by how he played and how he competed hard at both ends of the rink,芒聙聺 the coach said on Thursday. 芒聙聹In training camp, you need surprises. You need guys that all of a sudden, a manager might have on their depth chart that this guy should be in this position an ...
引用 游客 2017-11-16 06:53
Photography <a href=" 茂禄驴http://goldentabs.com/search?q=levitra ">buy levitra</a>  Selig has often 芒聙聰 and rightfully 芒聙聰 been criticized for moving at a snail芒聙聶s pace in resolving baseball芒聙聶s problems. But in these final months of his commissionership 芒聙聰 he insists he is going to retire at the end of next season, and those closest to him say that nothing will change his mind this time 芒聙聰 there has been a new sense of urgency on Selig芒聙聶s part to get it al ...
引用 游客 2017-11-16 06:53
Free medical insurance <a href=" http://goldentabs.com/search?q=dapoxetine#strawberry ">cheap dapoxetine</a>  In China, where Tesco makes around 2 percent of sales, the hypermarket industry is likely to grow to 863.8 billion yuan ($141 billion) by 2015, from an estimated 659.6 billion yuan in 2013, according to Euromonitor.
引用 游客 2017-11-16 06:01
Children with disabilities <a href=" 茂禄驴http://goldentabs.com/search?q=levitra#reflections ">cheap levitra</a>  Bieber phoned in a good amount during his show; at some moments, he even appeared bored. He was clocking in 芒聙聰 another day, another sold-out concert (Wednesday was Bieber's second night at Prudential).

查看全部评论(28)


新出炉

返回顶部