Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS not working #859

Closed
careyer opened this issue Apr 20, 2020 · 33 comments
Closed

DNS not working #859

careyer opened this issue Apr 20, 2020 · 33 comments
Assignees
Labels
bug Something isn't working

Comments

@careyer
Copy link

careyer commented Apr 20, 2020

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):

  • Pwnagotchi version 1.5.3
  • Windows 10
  • PC
@careyer careyer added the bug Something isn't working label Apr 20, 2020
@agent932
Copy link

I have had this same issue for the past few releases

@careyer
Copy link
Author

careyer commented Apr 21, 2020

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.

@ghost
Copy link

ghost commented Apr 21, 2020

+1

@dadav
Copy link
Contributor

dadav commented Apr 22, 2020

Derek assign: dadav

@derek derek bot assigned dadav Apr 22, 2020
@dadav
Copy link
Contributor

dadav commented Apr 22, 2020

As far as I know, we didnt rly change anything related to dns. But we used a new raspbian, so maybe something changed there

@dadav
Copy link
Contributor

dadav commented Apr 22, 2020

Omg, dnsmasq!!?

dadav added a commit to dadav/pwnagotchi that referenced this issue Apr 22, 2020
@nimbo78
Copy link

nimbo78 commented Apr 23, 2020

@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?

@dadav
Copy link
Contributor

dadav commented Apr 23, 2020

try: systemctl disable dnsmasq

then reboot

@LowSkillDeveloper
Copy link

LowSkillDeveloper commented May 19, 2020

v1.5.3 still having problems with DNS.
"systemctl disable dnsmasq" didn’t 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.

image

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.

@rileyinman
Copy link

@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.

@LowSkillDeveloper
Copy link

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.

@rileyinman
Copy link

rileyinman commented Jun 24, 2020

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.

@ByerRA
Copy link

ByerRA commented Sep 9, 2020

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.

@Gizmo1k
Copy link

Gizmo1k commented Sep 30, 2020

i am also having this same issue.

@normsteel
Copy link

Adding "server=8.8.8.8@usb0" to /etc/dnsmasq.conf seems to help.

@meldraknailo
Copy link

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).

@meldraknailo
Copy link

meldraknailo commented Oct 7, 2020

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.

@hschult
Copy link

hschult commented Oct 7, 2020

Neither disabling dnsmasq nor adding "server=8.8.8.8@usb0" did work for me.

@ByerRA
Copy link

ByerRA commented Oct 7, 2020

I can also confirm that adding "server=8.8.8.8@usb0" didn't work for me.

@davmol
Copy link

davmol commented Oct 17, 2020

Any new ideas about a solution? I'm really struggling to get it to work...

@syzspectroom
Copy link

Adding "server=8.8.8.8@usb0" to /etc/dnsmasq.conf seems to help.

fixed the issue for me.

@TheCrickler
Copy link

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.

@arn033
Copy link

arn033 commented Dec 30, 2020

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.

Hello, fixed the issue for me.
Great job.
Thanxs

@Spessmen14
Copy link

None of the solutions working for me , but I have Win7

@evilsocket
Copy link
Owner

@dadav very nice of you forking the repo, using the issues here to fix your own fork and not sending a PR back 👍🏻

@meldraknailo
Copy link

So I have been having issues with this forever, but finally seem to have it worked out such that any of my units will auto connect to the web when I plug them in without going through a bunch of crud. I use windows 10:

Connect the unit via usb.

Go to network adapter settings, ipv4, and set up the pwnagotchi as 10.0.0.1, 255.255.255.0, 8.8.8.8

Go to settings of the network you use to connect to the web. Unshare then share that connection with the pwnagotchi. Then go back to check the ipv4 for the pwnagotchi and make sure they are correct.

Should be able to ssh into the unit after that and use WinSCP or putty to find dnsmasq.conf and resolv.conf in /etc/.

I changed resolv.conf to contain only: nameserver 8.8.8.8nameserver 8.8.4.4nameserver 9.9.9.9

I then disabled dnsmasq using: systemctl disable dnsmasq

My dnsmasq.conf now says only:

interface=br0

expand-hosts

domain=example.com

dhcp-range=192.168.20.100,192.168.20.150,12h

@databonanza
Copy link

@dadav very nice of you forking the repo, using the issues here to fix your own fork and not sending a PR back 👍🏻

It seems that issues seem to go unfixed for long periods of time. To me, this indicates that the lead developer is too busy to maintain the project anymore.

Why would he send a PR back if it doesn't seem like you're trying very hard to "service" the community that is trying to use a product you made? After dealing with the issue of not being able to go into AI mode for days now, I've realized that there isn't much interest in resolving this issue. The newest image of pwnagotchi is broken and wont' go into AI mode. People have opened bugs about it. Looks like some are over a year old now without a viable fix.

@evilsocket
Copy link
Owner

evilsocket commented Jun 16, 2022

@databonanza

To me, this indicates that the lead developer is too busy to maintain the project anymore.

or maybe he trusts the community, that already did an amazing job in contributing, to help with the fixes given he has literally dozens of other projects he's working on ... who knows :D

... if it doesn't seem like you're trying very hard to "service" the community ...

oh, i didn't know that who's releasing unpaid software used by hundreds of people for free has an obligation to "service" the community, especially considering that such community is filled with other developers that can contribute with their code, fixes and PRs that get periodically merged ... noted!

trying to use a product you made?

this is not a product, otherwise you'd be paying for it and you'd get all the fixes you want as soon as you want. this is free software.

After dealing with the issue of not being able to go into AI mode for days now, I've realized that there isn't much interest in resolving this issue.

wow you're full of realizations and assumptions! i wish i was as informed as you seem to be about this whole thing :D

@evilsocket
Copy link
Owner

one might also argue that the more people with your attitude are around (and unfortunately there're plenty), the less one is willing to actually work on anything they're asking for

@databonanza
Copy link

^^ are you suggesting that you haven't fixed this because you have a community of people "with the wrong attitude"? Or is it something more normal like, you're too busy with other things? The former would be an incredibly poor choice to have people believe.

@databonanza
Copy link

How much can the community pay you to fix this critical bug that cripples your project in the most recent version?

I'm sure we could muster up something for your attention on this matter.

@evilsocket
Copy link
Owner

evilsocket commented Jun 16, 2022

let's say 10/90, but you're free to believe whatever you want :D

adios

@databonanza
Copy link

I bet with all the time spent thinking out the replies here you could have made a patch to fix the not going into AI issue today.

Repository owner locked as off-topic and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests