iptables、ipset、dnsmasq的组合使用

1、ipset和dnsmasq结合
Dnsmasq+ipset+iptables基于域名的流量管理 https://blog.csdn.net/lvshaorong/article/details/52981169

Dnsmasq / ipset / iptables 基于域名的智能路由 https://www.jianshu.com/p/b67d957068a8
关注下其中的sed使用方法:sed 's/127.0.0.1#5353$/8.8.8.8/g' dnsmasq_gfwlist_ipset.conf > /etc/dnsmasq.d/dns_gfwlist.conf
server=/zspeeder.me/127.0.0.1#5353 变为server=/zspeeder.me/8.8.8.8

2、dnsmasq的配套工具
https://www.mankier.com/package/dnsmasq-utils man手册
其中主要有2个命令 dhcp_release 和dhcp_lease_time分别为dhcp释放以及查询dhcp client的租期时间。

3、注意对dns数据流的导向
iptables -t nat -I PREROUTING -p tcp --dport 53 -j SNAT --to 192.168.44.1:53
iptables -t nat -I PREROUTING -p udp --dport 53 -j SNAT --to 192.168.44.1:53

4、dns缓存如何查询??

5、kms在dnsmasq上的自动激活
srv-host=_vlmcs._tcp.lan,R6900.lan,1688,0,100
windows查询nslookup -q=srv _sip._tls.xxx.com https://www.idc889.com/detail-2997.html
srv介绍 https://www.lijiaocn.com/技巧/2017/03/06/dns-srv.html

6、
自建DNS解析及Glue Record 自建DNS解析域名 https://www.bnxb.com/serverbasic/27510.html

7、

原文地址:https://www.cnblogs.com/weihua2020/p/14118981.html