DNSMasq for web DNS caching only

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Fri May 20, 2016 23:22    Post subject: DNSMasq for web DNS caching only Reply with quote
Hi,
I have some troubles with DNSmasq, I would use it only for caching DNS (not local) and speed up the web browsing. I have disabled the DHCP server in the main page and enable DNSmasq in the services tab with these simply options:





But it seems to doesn't work:

Code:
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 46 msec
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 57 msec
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 35 msec
Giulios-iMac:~ Home$


and I have no /etc/dnsmasq.conf file but from the Syslog the daemon is started...

router ARCHER-C7 v2
release r29739

Thsnks fot the help!


Last edited by giuliomagnifico on Sun May 22, 2016 17:55; edited 2 times in total
Sponsor
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Fri May 20, 2016 23:31    Post subject: Reply with quote
if i get it correctly i think dnsmasq+unbound is what u want, on index.asp page recursive dns resolving enabled it, if that router has the option. try that
_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Fri May 20, 2016 23:37    Post subject: Reply with quote
Umh no, unfortunately I don't have the recursive dns resolving option!

All I want is only to the have the dnsmasq.conf file and service, in order that when I type "www.google.com" it saves the ip in the DNSmasq file and the browser doens't need to look up/translate the google.com address in 172.217.19.68.

This thing: http://openrent.blogspot.it/2006/12/speed-up-your-browsing-with-dd-wrt.html
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Fri May 20, 2016 23:42    Post subject: Reply with quote
try with dnsmasq local dns on
_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Fri May 20, 2016 23:49    Post subject: Reply with quote
Code:
root@DD-WRT:~# ls /etc/
TZ                     group                  ld.so.cache            preinit
cert.pem               hosts                  ld.so.conf             privkey.pem
cidrroute.sh           hotplug2-common.rules  lease_update.sh        privoxy
comgt                  hotplug2-createmtd.sh  minidlna.conf          profile
config                 hotplug2.rules         motd                   protocols
cron.d                 hotplug2.startup       nocat.conf             resolv.conf
defaults.bin           hso                    nvram                  services
dhcp6c.conf            init.d                 openser                terminfo
dhcp6s.conf            ipkg.conf              openvpnlog.sh          vpnc
dictionary             issue                  openvpnstate.sh        wifidog-msg.html
dictionary.microsoft   kaid                   openvpnstatus.sh       www
ethertypes             key.pem                passwd                 xl2tpd
freeradius             l7-protocols           port-id-map
fstab                  langpack               postinit


no...it doesn't works Sad

Code:
root@DD-WRT:~# killall -sigusr1 dnsmasq
root@DD-WRT:~#


no dnsmaq.conf file and no service running...
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Fri May 20, 2016 23:53    Post subject: Reply with quote
i think u have to have dhcp enabled for dnsmasq to run, then also check use dnsmasq for dhcp. if u really cant live with dhcp on or have another dhcp server, u can try using dhcp forwarder as well.
_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sat May 21, 2016 0:04    Post subject: Reply with quote
Ok, I can use the dhcp server, but it's the same, no dnsmasq.conf file also after a reboot and no dnsmasq service active...

giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sat May 21, 2016 0:09    Post subject: Reply with quote
Wait, I have the file in /tmp...

Code:
root@DD-WRT:~# cat /tmp/dnsmasq.conf
interface=br0
resolv-file=/tmp/resolv.dnsmasq
all-servers
strict-order
stop-dns-rebind
cache-size=10000


Code:
root@DD-WRT:~# /bin/ps | grep [d]nsmasq
12024 root      1920 S    dnsmasq -u root -g root --conf-file=/tmp/dnsmasq.conf --cache-



but why not the caching file in /etc?!
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Sat May 21, 2016 5:03    Post subject: Reply with quote
if you want to speed up web browsing remove:

Code:
strict-order
stop-dns-rebind
cache-size=10000


add

Code:
query-port=0


tell me doest it make difference?
giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sat May 21, 2016 5:41    Post subject: Reply with quote
I don't know if there are differences because it doesn't work! DNSMasq doesn't create the dnsmas.conf file inside /etc (with the saved ip/urls) so is the same, I can write what options I want... Smile

The point is why it doesn't work?
giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sat May 21, 2016 13:32    Post subject: Reply with quote
Someone know why if I enable dnsmasq, the daemon does nothing, it doesn't create its config file under /etc? The dnsmasq.conf?

Can I create it by myself? (but I'm pretty sure it wouldn't work the same...)

Thanks
giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sat May 21, 2016 21:20    Post subject: Reply with quote
Mile-Lile wrote:
if you want to speed up web browsing remove:

Code:
strict-order
stop-dns-rebind
cache-size=10000


add

Code:
query-port=0


tell me doest it make difference?


Iust for cruosity I've done it, I've enabled also the dhcp and "use dnsmasq for dhcp".... but obviously no differences... the DNSMasq service seems to still doesn't work.

Code:
root@DD-WRT:~# cat /tmp/dnsmasq.conf
interface=br0
resolv-file=/tmp/resolv.dnsmasq
all-servers
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=50
dhcp-option=br0,3,192.168.1.2
dhcp-range=br0,192.168.1.3,192.168.1.52,255.255.255.0,1440m
query-port=0


Code:
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 34 msec
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 34 msec
Giulios-iMac:~ Home$ dig google.it | grep "Query time"
;; Query time: 16 msec


And I'm sure the daemon is running (but I don't what is doing Very Happy )

Code:
root@DD-WRT:~# grep dnsmasq /var/log/messages
Jan  1 00:00:14 DD-WRT user.info : dnsmasq : dnsmasq daemon successfully started
May 21 21:10:03 DD-WRT user.info : dnsmasq : dnsmasq daemon successfully stopped
May 21 21:10:03 DD-WRT user.info : dnsmasq : dnsmasq daemon successfully started
May 21 21:10:17 DD-WRT user.info : dnsmasq : dnsmasq daemon successfully stopped
May 21 21:10:17 DD-WRT user.info : dnsmasq : dnsmasq daemon successfully started



I need help, I've google everything in the last day but I can't figure why it doesn't work (and why there isn't the /etc/dnsmaq.conf).
jwoods
DD-WRT User


Joined: 13 Mar 2016
Posts: 403

PostPosted: Sun May 22, 2016 6:07    Post subject: Reply with quote
You might try the steps in this article...

http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/
giuliomagnifico
DD-WRT User


Joined: 11 Apr 2016
Posts: 454
Location: Italy

PostPosted: Sun May 22, 2016 12:09    Post subject: Reply with quote
jwoods wrote:
You might try the steps in this article...

http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/


Thanks but the problem is that I don't have the /etc/dnsmasq.conf file...every tutorial is pretty useless because starts from the /etc/dnsmasq.conf file. And /etc is a not writable directory, I can't create it.

The dnsmasq daemon is running but it does nothing because it doesn't save/caching the ip/urls.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6437
Location: UK, London, just across the river..

PostPosted: Sun May 22, 2016 13:18    Post subject: Reply with quote
well if you say there is no local DNS on, so how the adblocking works then ??
I do have local DNS on, as well i can state its working on my unit..and i do believe it caches in trough the time..
There are some occasions, that Local DNS breaks down, and i
have to restart the router but its very rare...
So try erase nvram, start from a scratch or try different build

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum