Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: Surf3r on 28 February 2022, 17:54:36

Title: [SOLVED] Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 17:54:36
Tried to put to work  dnsmasq but fails to do so specifically in my case resolving my dns queries as a DoH so perhaps is not working as a normal resolver either falling back to  dhcpcd. Followed arch wiki made the modifications inside /etc/dnsmasq.conf but it does nothing. I'm using dhcpcd as my network manager and modified that too in order to listen on 127.0.1. But seems that dnsmasq reads from resolv.conf as well but in my case i don't want dhcpcd to read from resolv.conf to speed up things. Also there is an option in dnsmasq.conf to make it not read from resolv.conf but still without any success. It's true that perhaps my other application (NTS secure time) listens on localhost 127.0.0.1 so could be an conflict or something. Tnx for the time for the guys that might be more network savvy and give this one a shot. Cheers  :)
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: nous on 28 February 2022, 20:55:15
It's not very clear what you're trying  to do, but I think you've got it wrong. For one, dhcpcd is not a DNS resolver and won't "listen to 127.0.0.1" for such requests.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: calvinh on 28 February 2022, 21:37:30
check which process is listening on port 53.

Code: [Select]
$sudo netstat -peanut | grep 53
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 21:54:02
If dhcpcd is not my resolver i don't know what is then. Inside etc/dhcpcd.conf was an option to disable writing to resolve.conf so since it doesn't use that then what it uses? Is dnsmasq using any special kernel modules or something? It's hard to make some sense of these packages (unbound/dnscrypt/stubby) as all seem to do similar things but differently so can happen conflicts even if i did not see any conflict warnings when i installed. It's possible i think perhaps  firefox uses port 53 to solve dns maybe dnsmasq uses other ports. Also i did not see any special 'knobs' to turn differently for normal dns vs DoH inside dnsmasq.conf. Another thing that puzzled me was when tried stubby it tried to pull unbound also which is weird so i ditched that option thinking dnsmasq better but seems not to be the case.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 21:57:27
 Command 'netstat -peanut | grep 53' returns nothing
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: calvinh on 28 February 2022, 22:17:13
Command 'netstat -peanut | grep 53' returns nothing

You gotta run the cmd line with root privilege.  If that's what you did, dnsmasq is not running (or configured to listen on another port) in your system.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 22:18:00
So i want to use nextdns and all they have is this to be added to dnsmasq.conf (see print screen)
Adding all those lines does nothing as well. Is anyone actively using dnsmaq. Could be more systemd depended than we know or what??

(https://i.ibb.co/c6k48c0/Screenshot-2022-02-28-23-05-18.png)


Those info you see is a temporary nextdns profile so nobody should use it. It's just an example.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 22:23:13
Well i removed dnsmasq for now till i can hear somebody is using it as at this point think is a failed or not maintained. But anyway that command should showed at least other things cos for sure i use port 53 to update my system.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: calvinh on 28 February 2022, 22:27:01
Code: [Select]
$ sudo netstat -peanut | grep 53
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      0          16758      822/dnsmasq        
tcp6       0      0 :::53                   :::*                    LISTEN      0          16760      822/dnsmasq        
udp        0      0 0.0.0.0:53              0.0.0.0:*                           0          16757      822/dnsmasq        
udp6       0      0 :::53                   :::*                                0          16759      822/dnsmasq
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 28 February 2022, 22:53:48
Ou cool tnx. So it works. Do you use it as a DoH also or just plaint text? For sure it listens things but still is a long way to declare it as working properly. Remember i saw it listens with netstat -atupln but worked slow not to speak about DoH that did not work at all
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: calvinh on 28 February 2022, 23:54:42
Ou cool tnx. So it works. Do you use it as a DoH also or just plaint text? For sure it listens things but still is a long way to declare it as working properly. Remember i saw it listens with netstat -atupln but worked slow not to speak about DoH that did not work at all

I use dnsmasq as a simple dns cacher. Not sure if DoH is supported in dnsmasq itself. You may need a wrapper like https-dns-proxy to handle https part.
Title: Re: Dnsmasq not working as a DoH perhaps neither as a normal resolver
Post by: Surf3r on 01 March 2022, 00:34:25
That's a good point, i thought about it maybe doesn't even support DoH, not to speak about DoQ (Quick). Think i should try DNSCrypt seems to be the best. Tnx  :)