路由器(Router)是一种网络设备,用于连接多个网络并转发数据包。域名(Domain Name)是互联网上用于标识主机或服务的易于记忆的名称,例如 www.example.com
。
禁止域名访问可以带来以下优势:
路由器禁止域名的方式主要有以下几种:
原因:
解决方法:
ipconfig /flushdns
清除DNS缓存。sudo killall -HUP mDNSResponder
清除DNS缓存。# 配置DNS过滤规则
uci set dhcp.@dnsmasq[0].filter_aaaa='1'
uci set dhcp.@dnsmasq[0].filter_a='1'
uci set dhcp.@dnsmasq[0].filter_cname='1'
uci set dhcp.@dnsmasq[0].filter_ptr='1'
uci set dhcp.@dnsmasq[0].filter_soa='1'
uci set dhcp.@dnsmasq[0].filter_naptr='1'
uci set dhcp.@dnsmasq[0].filter_dhcp='1'
uci set dhcp.@dnsmasq[0].filter_dhcp6='1'
uci set dhcp.@dnsmasq[0].filter_tftp='1'
uci set dhcp.@dnsmasq[0].filter_ssh='1'
uci set dhcp.@dnsmasq[0].filter_http='1'
uci set dhcp.@dnsmasq[0].filter_https='1'
# 添加禁止域名规则
echo "address=/example.com/127.0.0.1" >> /etc/dnsmasq.conf
# 重启DHCP和DNS服务
/etc/init.d/odhcpd restart
/etc/init.d/dnsmasq restart
通过以上方法,您可以有效地禁止路由器上的域名访问,并解决相关问题。
领取专属 10元无门槛券
手把手带您无忧上云