5分钟入门dnsmasq

发布时间:2020-03-05 09:12:45 作者:siwen1017
来源:网络 阅读:230

5分钟入门dnsmasq

Dnsmasq 提供 DNS 缓存和 DHCP 服务功能

dnsmasq install

yum install -y dnsmasq
systemctl enable dnsmasq

dnsmasq config

# vi /etc/dnsmasq.conf

listen-address=192.168.1.132,127.0.0.1

## 转发域名解析
server=/cn/114.114.114.114
server=/taobao.com/114.114.114.114

## 指定域名解析
address=/ad.iqiyi.com/127.0.0.1
address=/ad.iqiyi.com/127.0.0.1

## DHCP设定
dhcp-range=192.168.1.50,192.168.1.150,48h

dhcp-host=00:0C:29:5E:F2:6F,192.168.1.201,os02
dhcp-host=00:0C:29:15:63:CF,192.168.1.202,os03

local=/ic.lo/
domain=ic.lo

dhcp-option=3,192.168.0.1

# restart service
systemctl restart dnsmasq

dnsmasq check

dig www.baidu.com
推荐阅读:
  1. 轻量级的DNS服务器--DNSmasq
  2. dnsmasq的使用以及Raspberry Pi AP功能改进systemd服务封装

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

dnsmasq %d nsm

上一篇:bugku 不好用的CE WriteUp

下一篇:如何去掉字符串中不需要的字符

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》