一直想自建一个属于自己的DNS,这不,终于暑假了,终于有时间去折腾了
其实安装过程很简单,3步2步就完成了
首先,登陆服务器
然后我们需要安装dnsmasq
[text]yum install -y dnsmasq[/text]
安装完成后,启动服务
[text] systemctl status dnsmasq.service -l [/text]
接着编辑配置文件
[text] vim /etc/dnsmasq.conf yum install vim //如果没有vim请安装 vi /etc/dnsmasq.conf //不想安装vim请用vi[/text]
将其修改成这样
[text] resolv-file=/etc/dns0.conf strict-order [/text]
其中dns0.conf可以修改成任何你喜欢的名称,但是在下一步时请自觉替换教程中文件名为dns0.conf为你喜欢的名称
在 /etc/dns0.conf 中添加如下内容
[text] nameserver 223.5.5.5 nameserver 223.6.6.6 nameserver 114.114.114.114 nameserver 114.114.115.115 [/text]
重启dnsmasq
最后,输入
[text] systemctl status dnsmasp.service -l netstat -tunlpgrep 53 [/text]
如果第一条命令出现running,第二条命令有反馈及为安装成功
最后,美滋滋的换上你的DNS服务器(我的是内网的,外网的服务器真的没有服务器可以给我折腾了…)
广告
暂不开放评论,如对本文有任何疑问或建议,请联系apple@mr-wu.top
All Tags