This would be the third post in a series. You might want to read the first in the series if you haven’t already done so. Here, I continue with the work related to rendering the game server’s ads so that they don’t display at all.
It struck me that if I could build a relatively-ignorant DNS server of my own and point my iPad to it then I could control which servers my computer talks to. Remove everything but the minimum and this should work for killing the Agar.io advertisements.
So I would need to use
nslookup to find the IP addresses of the servers the game talks to. And since I’m authenticating via Facebook’s mechanism I’d need to educate the DNS server to this as well.
I happen to have an Ubuntu server which is under-utilized at the moment since I’m using it to develop WordPress plugins. So I installed
bind9 (the DNS service) to this server and then configured it with some entries and zones:
- agar.io @, www and m
- facebook.com @ and www
For each of the entries above, I just used the
nslookup command to determine what the normal IP address(es) would be and used those values.
The next step would be to make sure that this
bind service does not do recursive lookups, in other words, it won’t ask for help if it doesn’t know the zone in question. So in theory, it will only give answers to the entries I’ve made; anything else will fail a lookup.
Next, on the iPad -> Settings -> Wi-fi -> my zone area, I manually set the only DNS server to be the IP address of my private server. I then confirmed that in a browser I could not resolve Google.com but could see the webpage for Agar.io.
Did it work? Not yet. Upon startup it either is missing a critical server it needs to talk to and the app now can’t do the DNS lookup to find that server. It’s okay. I’ll keep hacking away at this to find out what server that is. I should be able to get this approach to work, I just need to go to school on the application some more to find out.