安装部署
MacOS安装RabbitMQ
API网关部署
Centos安装Chrome浏览器
gitlab
gitlab-cicd
gitlab-runner安装配置
Gitlab-CICD实践篇
gitlab维护
gitlab备份-异地恢复-升级
gitlab从13.10.2升级至14.4.1出现的问题
Let's Encrypt
Let's Encrypt 申请证书
certbot发起web认证请求流程
安装CMDBUILD
vim配置
keepalived
配置样例
wine tips
supervisord
kafka
zookeeper
minio
django
jupyter
supervisor管理的kafka zookeeper集群部署
dnsmasq
apisix
APISIX结合skywalking对各个服务的访问情况进行监控
APISIX通过consul动态发现服务
Grafana Labs
Loki(stack)
etcd
redis
mongodb
mongodb添加仲裁节点
consul
sqlite更新升級
openssl安裝升級
emby
inotify-tools
caddy
caddy规则
ohmyzsh tips
debian-nvidia-container-runtime
openwrt+802.1x+freeradius+casdoor
本文档使用 MrDoc 发布
-
+
首页
dnsmasq
# [dnsmasq](https://thekelleys.org.uk/dnsmasq/ "dnsmasq") [配置教程](https://cloud.tencent.com/developer/article/1174717) 一个轻量的pxe、tftp、dhcp和dns服务端,适用于小型网络(终端数<50),可以加速dns缓存或劫持dns起到免广告,解析内网域名等作用。 ## 安装 ```shell yum -y install dnsmasq # 如果要使用dncp功能还需要dhcp数据库 yum -y install dnsmasq-utils # 开机自启动 systemctl enable dnsmasq # 启动服务 systemctl start dnsmasq # 检查是否启动成功 nslookup qq.com 127.0.0.1 # 修改系统默认dns cat /etc/resolv.conf >> /etc/dnsmasq.resolv cat >> /etc/dnsmasq.conf <<\EOF resolv-file=/etc/dnsmasq.d/resolv.conf EOF cat >> /etc/resolv.conf <<\EOF nameserver 127.0.0.1 EOF ``` ## 基本配置 - 自定义host,类似修改本地host ``` cat >> /etc/dnsmasq.conf <<\EOF addn-hosts=/etc/dnsmasq.hosts EOF cat /etc/dnsmasq.hosts 127.0.0.1 my.test.com nslookup my.test.com 127.0.0.1 Server: 127.0.0.1 Address: 127.0.0.1#53 Name: my.test.com Address: 127.0.0.1 ``` - 使用特定dns服务器解析特定域名 ``` # 指定域名与dns可能会包含很多条记录建议分开配置文件 cat >> /etc/dnsmasq.d/servers.conf <<\EOF server=/google.com/8.8.8.8 EOF # 对比下下面三条命令的结果,本地是否与8.8.8.8相同 nslookup www.google.com 114.114.114.114 nslookup www.google.com 127.0.0.1 nslookup www.google.com 8.8.8.8 ```
zhangky
2022年1月13日 15:08
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码