Describe the bug
When using internet connection sharing (Windows 10) I cannot get DNS working. Pwnagotchi always tells me "ping: google.com: Temporary failure in name resolution." when I try to ping google for example. I can ping the direct IP though, so internet connection sharing is in principle working.
I can temporarily fix the problem by editing "/etc/resolv.conf" and replace 127.0.0.1 with 8.8.8.8 in there. It will instantly start working after that. However the resolv.conf will be overwritten on each boot with 127.0.0.1 again.
Also tried setting a DNS server in the RNDIS Ethernet Interface in windows (8.8.8.8) but that has no effect. Tips are welcome!
Thanks!
Environment (please complete the following information):
I have had this same issue for the past few releases
Former release 1.4.3 was working well for me. Re-Imaged 1.5.3 several times now but the problem persists. Also tryied a fresh 1.5.3 install and 1.5.3 with restore from backup. Both variants have the same problem. Reverted back to 1.4.3 and there it works without problems.
+1
Derek assign: dadav
As far as I know, we didnt rly change anything related to dns. But we used a new raspbian, so maybe something changed there
Omg, dnsmasq!!?
@dadav
when trying to connect though inet sharing with win10:
cat /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1
for some reason now rpi can't get dns from win10..
may be we need use some static nameservers?
try: systemctl disable dnsmasq
then reboot
v1.5.3 still having problems with DNS.
"systemctl disable dnsmasq" didn鈥檛 help :(
UPD:
I do not know how, but Quad9 DNS 9.9.9.9 appeared.
I deleted it, and leaving only Google DNS and it worked.

I have never used this DNS. Perhaps it was picked up via bt from a smartphone (I don't know where it came from), and google DNS from a PC, and because of this, such a problem arose.
@LowSkillDeveloper I was looking at the bt-tether code for other reasons and remembered your message, because it looks like it was added in #279. I'm not exactly sure why this is the case... maybe @dadav could clarify.
Yes! This is it. When i setting up, I turned ON "share_internet" to unload handshakes.
And it seems DNS overlapped.
I'm not sure, but I think they should hit on different lines. There was no gap between them at all, in the screenshot above it can be seen.
It does seem odd that it ended up after your current DNS settings, considering it's supposed to seek(0) and write with a newline (meaning it would end up on a line above all other configuration). However, I'm also wondering why it's even necessary to override the user's DNS configuration.
Has any progress been made on this issue as I just had to re-flash my pwnagotchi due to a bad SD card and are running into the same issue. If I manually edit the /etc/resolv.conf file it doesn't solve the problem and disabling dnsmasq doesn't work either.
i am also having this same issue.
Adding "server=8.8.8.8@usb0" to /etc/dnsmasq.conf seems to help.
I've had this issue since setting up my panagotchi about a month ago. Several reflashes later and I still have to edit resolv.conf every time I connect the unit to my pc or laptop (both windows 10).
I found a thread somewhere that allowed a permanent fix:
add: "server=8.8.8.8@usb0" to /etc/dnsmasq.conf
That fixed my issue and I automatically share connection on windows now.
Neither disabling dnsmasq nor adding "server=8.8.8.8@usb0" did work for me.
I can also confirm that adding "server=8.8.8.8@usb0" didn't work for me.
Any new ideas about a solution? I'm really struggling to get it to work...
Adding "server=8.8.8.8@usb0" to /etc/dnsmasq.conf seems to help.
fixed the issue for me.
Try adding dns-nameservers 8.8.8.8 under the gateway line in /etc/network/interfaces.d/usb0-cfg
The _resolveconf_ program is responsible for auto-generating the _resolve.conf_ file during boot based on the files in /etc/network/interfaces.d/
Since raspbian is based on debian, see Debian Wiki: Defining The Nameservers
It has been working stable for me, I hope this helps.
Most helpful comment
try: systemctl disable dnsmasq
then reboot