Closed Zero3K closed 6 years ago
Some ads aren't being blocked when using a Raspberry Pi that has Pi-hole running as the custom DNS
Is it related to gnirehtet?
I did some testing. It turns out to be a problem with gnirehtet since the ads are blocked after adding the blocklists I was using in Blokada to the Pi-hole and dissbling Blokada (thereby using only the Pi-hole to block ads).
I don't really know all the tools you are talking about, but gnirehtet just use the DNS servers you provide. It is not aware of any blocking-ad related stuff.
I know. I used the IP of the Pi-hole as the custom DNS server. It seems like not all DNS queries are using it. Otherwise, those ads would have been blocked.
So, it seems like it should be fixable.
Maybe your Android device/app already resolved this address and cached it, so that it did not requested it again to the DNS server when you loaded the page.
Otherwise, you can check the UDP connections in the logs (compile the last version though, the last release does not log correctly UDP requests), they are probably DNS requests. This may help to follow DNS requests.
For further investigation, you could increase the log level to VERBOSE
to print the packets data.
I tried fixing it by using two entries of the same IP in the command line parameter for the relay.jar. It didn't help in fixing it. Now to try increasing the log level to VERBOSE by compiling the latest source code. After running the latest build for a bit, I will reply with the more detailed log compressed as a ZIP archive. By the way, I've been noticing that the app is crashing while using the reverse tethering connection when it normally doesn't.
I upgraded to the latest build. Now the custom DNS parameter is no longer working.
EDIT: I fixed the issue by manually changing the DNS server that is in the GnirehtetService.java file located in \app\src\main\java\com\genymobile\gnirehtet.
EDIT2: Maybe a file (such as gnirehtet.conf) could be used to specify its configuration instead of relying on command line parameters.
EDIT3: I am attaching the log as promised to see if there's any improvements that can be done to it (In regards to the app, I am getting a never-ending loading circle in the list of users that are currently online every so often along with crashing I mentioned).
I upgraded to the latest build. Now the custom DNS parameter is no longer working.
Please give more details. I just try it again, it works here.
I am trying the command in Windows 7. The command line I am using is "C:\Program Files\Java\jre1.8.0_112\bin\java.exe" -Xms200M -Xmx200M -jar relay.jar --esa dnsServers 10.0.1.85 > gnirehtet.log.
The command line I am using is "C:\Program Files\Java\jre1.8.0_112\bin\java.exe" -Xms200M -Xmx200M -jar relay.jar --esa dnsServers 10.0.1.85 > gnirehtet.log.
The DNS servers must be configured on the Android-side (the client creates the requests), so:
adb shell am startservice -a com.genymobile.gnirehtet.START --esa dnsServers 10.0.1.85
The relay server does not accept any parameters (it ignores them).
Heh, it was that easy after all. Thanks for telling me how to get it to work. Maybe you can add info on how to set it to the readme.
Was this the root cause of this issue?
Yes. Now to figure out the issue with the never-ending loading circle, etc.
So can you figure that out or not?
So can you figure that out or not?
You mean, the reason why you have an infinite progress bar on your application I know nothing about? No, I can't figure that out ;-)
Well, you could try it out and see what happens.
Maybe the app I mentioned is having the same issue as the ones I made issues about. I'll go ahead and close this one since the main reason for it has been figured out. Hopefully the app works when the other ones work properly.
I am attaching a log with its level set to debug to see if that helps fix the issue with the app I mentioned.
I have no idea how to correlate what you observe (an infinite progress bar, when?) and 20 minutes of logs.
I can only see that sometimes, for some reasons, Android is trying to connect to the same IP as your DNS server (10.0.1.85) on port 443, but the connection fails. It works only on port 53 (DNS requests) and port 80 (you have probably an HTTP server there).
Oh, maybe it doesn't handle timeouts that well. So, it keeps trying to connect with no success.
Is that an actual problem or not?
I don't think so. I have no concrete element indicating that gnirehtet causes a problem here.
Some ads aren't being blocked when using a Raspberry Pi that has Pi-hole running as the custom DNS. I added the lists that are in the app (which is called Blokada) that I am using on the tablet (which does block the problematic ads) but they are still showing up every so often in the "Free Video chat online" app (NSFW).