1、安装dnsmasq 1.1yum install dnsmasq 查看dnsmasq对ipset的支持 Dnsmasq -v 1.2 dnsmasq配置 前两句的意思是将所有.com和.hk结尾的域名请求都发往OpenDNS的服务器,端口5353,这样可以防止ISP和GFW的一些域名污染,防止请求的页面被误导或者页面上出现莫名其妙的广告 最后一行是指将yahoo.com和google.com的域名解析IP...
机器生成的dnsmasq配置文件在/var/etc/下, 可以通过ps|grep dnsmasq查看. 这个配置文件中conf-dir的默认值是/tmp/dnsmasq.d, 这个是内存中的目录不能持久化保存. 所以要进行修改. 通过修改/etc/config/dhcp, 在config dnsmasq这组下添加一项配置实现 configdnsmasq ... option confdir'/etc/dnsmasq.d' 然后创建...
如果iptables+ipset透明代理仍然无法正常使用,你需要检查系统日志以定位问题。你可以查看iptables、ipset和dnsmasq的日志(如果它们有单独的日志文件)或系统的主日志文件(如/var/log/syslog或/var/log/messages)。 例如,在Debian/Ubuntu上,你可以使用以下命令查看dnsmasq的日志: bash sudo journalctl -u dnsmasq 或者使用...
修改/etc/config/dhcp, 在config dnsmasq下添加一项配置, 这个配置会在机器生成的dnsmasq配置文件中, 添加conf-dir配置. 默认是/tmp/dnsmasq.d, 这个是内存中的目录不能持久化保存. config dnsmasq ... option confdir '/etc/dnsmasq.d' 1. 2. 3. 然后, 创建 /etc/dnsmasq.d目录, 并创建配置文件 /etc/...
ipset:作为iptables和dnsmasq的中转,一个用来记录dnsmasq解析出来的IP,二是iptables使用ipset的表来控制访问权限 配置 网关服务器配置 安装dnsmasq [root@route-a ~]# wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.70.tar.gz [root@route-a ~]# tar zxvf dnsmasq-2.70.tar.gz ...
Iptables中的OUTPUT链调用ipset表 操作部署: 1.dnsmasq #安装dnsmasq yum -y install dnsmasq #kill掉系统自带的dnsmasq进程,如果不kill掉安装的dnsmasq进程将启动失败 killall -9 dnsmasq #启动dnsmasq进程并设置开机启动 systemctl --now enable dnsmasq
Code Issues Pull requests Discussions chinadns 重构增强版,支持域名分流、ipset/nftset、UDP/TCP/DoT dns iptables dnsmasq dot netlink ipset gfwlist chinadns nftables dns-over-tls chinadns-ng ss-tproxy Updated Feb 19, 2025 Zig qoomon / docker-host Sponsor Star 1.1k Code Issues Pull request...
无线路由器上跑的透明代理,使用 v2ray+dnsmasq+ipset。 在 RT-68U Merlin (384.4_2) 固件上测试通过。 注意: v2ray v2.45 版本是测试可运行的最高版本, v2.46 以上的版本增加了 geoip.dat 会使 v2ray 在启动时出错崩溃,错误是 'out of memory'. 这个跟 Golang 的虚拟内存管理有关. 如果想使用最新版本...
no-DNSSEC no-ID loop-detect inotify dumpfile This software comes with ABSOLUTELY NO WARRANTY. Dnsmasq is freesoftware, and you are welcome to redistribute it under the terms ofthe GNU General Public License, version 2 or 3. 你需要使用entware里边带match ipset的iptables版本.有用 回复 ...
iptables只能根据ip地址进行转发,不能识别域名,而dnsmasq-full不仅可以实现域名-IP的映射,还可以把这个映射关系存储在ipset中,所以使用dnsmasq+ipset就可以实现iptables对域名的转发,可以实现很多功能,比如: 禁止浏览某些网站,如taobao.com 对国内和国外的流量进行不同路径的转发或者代理,可以应用在ss或者SSH这样的代理中,...