手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

CentOS 7.1配置dnsmasq

时间:2024-11-04 05:09:02

1、Cent OS 7.1上面版本网络配置,请按以下图示进行操作(如果网络已经配置好,可以直接进入第二步):

CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq

2、防火墙配置使用如下命令:systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动也可以不用关闭防火墙,单独打开53端口执行效果如图所示:

CentOS 7.1配置dnsmasq

3、设置本机localhostdns地址,由于我的centos系统本地地址为:192.168.0.149,我的设置如下图所示:打开/etc/hosts文件,修改为如下内容:

CentOS 7.1配置dnsmasq

4、使用yum安装dnsmasq执行如下命令组:sudo yum install dnsmasq执行结果:

CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq

5、配置dnsmasq.conf,使用编辑器打开/etc/dnsmasq.conf,进行编辑,编辑内容如下图所示:

CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq

6、编辑/etc/resolv.config内容中新加如下部分:

CentOS 7.1配置dnsmasq

7、增加dnsmasq.hosts文件

CentOS 7.1配置dnsmasq

8、使用此命令检查系统没有占用53端口:netstat -antp如果有就kill掉执行效果如下:

CentOS 7.1配置dnsmasq

9、启动服务service dnsmasq start

10、检查服务是否正常运行执行命令:netstat -antp

CentOS 7.1配置dnsmasq
CentOS 7.1配置dnsmasq
© 手抄报圈