I'm follow the instruction from this link to block some domain: How to block particular Web sites - #7 by vgaetera
I found that can work perfect only after reboot my router TP-Link Archer C50 Openwrt Version 21.
However, when I restart "dnsmasq" it is not updated to block domains.
Based on your expertise, could you please help me how can I solve this issue without reboot my router?
Warmly thank you so much~
I understand you are following the instructions at DNS Filtering? Restarting
dnsmasq should enable the block; could you explain exactly what are you doing, and how are you testing it, please?
my flow commands as below:
uci add_list dhcp.@dnsmasq.address="/youtube.com/127.0.0.1"
uci commit dhcp
=> if I don't reboot my router, it is can access youtube.com from browser. When I reboot my router, it is working well for block youtube.com.
I don't know how can solve this issue, could you please advice to me~
Cashed DNS entries on client, tried rebooting the client, instead of the router ?
Also, use 0.0.0.0, not 127.0.0.1, 127 will make the client do a connection attempt, and time out, while 0.0.0.0 will abort immediately.
By the sound of it, it's probably not an Openwrt issue.
list address 'youtube.com/#' to return
list address 'youtube.com/' to return nxdomain in
dear @frollic, thank for your advice, I tried that, it can run first time, however after that it can access again
Ok, are you sure your clients are using your DNS ?
Does it work when you try to ping ?
yess, I'm sure to use this and this is below my list block as your recommendation in "/etc/config/dhcp"
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option leasefile '/etc/dhcp.leases'
list address '/dantri.com.vn/0.0.0.0'
list address '/vnexpress.net/0.0.0.0'
list address '/asicland.com/0.0.0.0'
list address '/youtube.com/0.0.0.0'
when I test with nslookup, it seem not work, but when I use firefox browser to access, it can access
root@OpenWrt:/tmp/dnsmasq.d# nslookup youtube.com
This is on the router, not a client, apples and bananas.
on the client device, I used firefox to access these websites, it can access after dnsmasq restart from router
Like i said, does it block it on the client, if you try ping ?
Disabled DoH in the browser?
could you please instruct more about this?
Tried "Firefox disable DoH" at Google ?
Like I said, this is probably a client issue.
hmm, it seems from the client, that it can ping youtube
I think the router is not successfully blocking my target link, it seems not from the client issue
And what is the client OS?
Do an nslookup on the client.
i'm using ubuntu 20 LTS
Is Ubuntu then using your DNS ?
yess, it is connect with my router by ethernet cable
Answer the question instead.