Raspberry Pi As an Ad Blocking Access Point
coop0030 writes "Adafruit has a new tutorial that will show you how to use your Raspberry Pi as a WiFi access point that blocks ads by default for any devices using it. This is really neat in that it would work for your Android or iOS device, your Xbox 360, TiVo, laptop, and more without needing to customize any of those devices other than to use your Raspberry Pi as the access point for WiFi. Using an ad-blocker can be useful for conserving bandwidth, helping out low-power devices, or for keeping your sanity while browsing the web!"
Yeah, we've heard it all before, we'll hear it all again, and nothing much will change.
Those who do study history are doomed to stand helplessly by while everyone else repeats it.
Why do you need a RasPi for this? Why not do this in the router itself and save a little bit of power?
There's no -1 for "I don't get it."
Privoxy can remove a lot more than just ads served from a given domain/server. It can remove ads served by the same domain/server as the source website, as well as a number of other features that make it pretty nice for speeding up browsing on devices that don't have ad/javascript blockers.
You mean I will no longer have to click on Slashdot, "Ads Disabled! Thanks again for helping make Slashdot great!"
Seriously, though, this is another utility to download ad server lists, fair enough, but when enough people do this, content providers will just switch to serving the ads directly, the ad companies will forward it to them. The rest is cost negotiation and more Akami (or whatever it is) type stuff.
(-1: Post disagrees with my already-settled worldview) is not a valid mod option.
For me, I block ads because they are actually a threat to browsing. In the old days, Flash ads that would pop out a player which extended off the end of the window would crash the browser. These days that's less of a problem, but there are plenty of others still around.
Privacy: advertising is probably the biggest non-government threat to online privacy. I don't really care whether advertisers would respect *my* DoNotTrack headers; I won't even connect to their servers. Supercookies? You'd need to be able to set them, first. Even if a certain site is allowed for some reason, I don't let it see my other browsing history; it gets only a distorted and meaninglessly narrow view.
Security: Advertising networks are one of the biggest problems to online security right now. At least once a month (on average, it comes in waves), one of the web comics I read gets hit with a malicious ad that attempts to serve malware / exploit kits to anybody visiting the site. This has also happened to high-profile reputable news sites and so forth as well. The ad providers don't seem to give a fuck, and the sites serving the ads can't really control the ad content before it's served. Whether it's browser exploits, Flash exploits, Java exploits, embedded PDF exploits, or something else, ad networks cheerfully serve up malicious garbage all the time. You know that advice about "avoid the seedier parts of the web"? Yeah, you can't do that without an ad blocker. Everything is seedy otherwise.
For sites that need money to keep them running, I donate. A few hundred dollars a year in donations is no big deal for me, and it's probably more money than the sites in question would get from my ad impressions anyhow.
There's no place I could be, since I've found Serenity...
Computer does thing other computers can do!
systemd is Roko's Basilisk.
Instead of shoving a list of addresses into a DNS server (dnsmasq) in this case, it would be better to use RPZ (http://en.wikipedia.org/wiki/Response_policy_zone)....
Next to that:
> Open the file with sudo nano /etc/resolv.conf and replace the contents with the following:
> nameserver 192.168.42.49
> nameserver 8.8.8.8
> nameserver 4.4.4.4
192.168.42.49 = apparently the address of the fake webserver (would be great if they configured that somewhere before making test queries....)
8.8.8.8 = Google Public DNS, no ads maybe but running all your DNS queries through Google is not helping much now does it.
4.4.4.4 = is not a valid DNS server, likely they meant 8.8.4.4 which is the secondary Google Public DNS address.
If you have a DNSmasq anyway, just let it recurse and play caching resolver, much better idea.
> iface wlan0 inet static
> address 192.168.42.1
> netmask 255.255.255.0
> post-up ip addr add dev wlan0 192.168.42.49/24
One just has to wonder which IP the box will be using for outgoing queries, depends a lot on the kernel.... .1 would always be chosen, but as a /24 magical things will happen
Now if that was 192.168.42.49/32 the
Etoomanypitholes and lots of people will be bitten.
http://unfix.org
Why not do this in the router itself and save a little bit of power?
Because not everybody's home router 1. is easily customized and 2. has enough memory. I've read that my seven-year-old NETGEAR WGR614 v6 doesn't have enough flash for DD-WRT, and some people don't want to bother soldering, and some other routers are tivoized not to run an unapproved kernel. If I were to replace it with newer hardware, what make and model of home router would you recommend for no more than the price of a Raspberry Pi?
4.4.4.4 = is not a valid DNS server, likely they meant 8.8.4.4 which is the secondary Google Public DNS address.
It's also possible they meant 4.2.2.[1-6] (of which 4.2.2.4 may be the most popular), which isn't really a public DNS server either, but may be close enough to count as a backup for Google.
http://michaelsmith.id.au
Filtering ads via the host file is a nice solution
I use the host file (with some minor tweaks of my own) from http://someonewhocares.org/hosts/
4.4.4.4 used to be a valid DNS server.
> post-up ip addr add dev wlan0 192.168.42.49/24 ... just adds the ip to the interface and sets the net mask to /24. Nothing magical about it, its not really and different than the lines above it really.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Using mine as a wifi hotspot cuts my internet speed from 4.5MB/s to about 2.0 MB/s. That's without running anything else besides an ssh tunnel into it. I had high hopes for this little device, and it has taught me a lot, but at the end of the day it's a $35 computer.
Could it be used to spoof an ad server? I have used a number of Android apps that will continuously try to reach ad servers if you use any sort of ad blocks, which causes extra battery drain. Could this system be set up to send some placeholders so the app will stop trying to pull an ad?
Weird that this shows up as I just saw AdTrap being advertised on CNN.
It's a pretty amateur configuration alright. You failed to notice that DNSMASQ's configured DHCP Range includes 192.168.42.49. I haven't tested it but I'm hoping that DNSMASQ is smart enough to *not* serve up it's own address in the dynamic pool.
Silly DNS scripts seems like a bad way to achieve this, Privoxy would be better, and the Pi's ethernet-over-USB setup (and a USB wifi donlge) is going to make this pretty slow.
Why does this have to be a Pi-specific tutorial, you could do this better on pretty much any Linux box.
#include <sig.h>
Hosts do more w/ less (1 file) @ a faster level (ring 0) vs redundant browser addons (slowing up slower ring 3 browsers more) by filtering for the IP stack (coded in C & loads w/ OS + 1st net request & 1st resolver queried w\ 45++ yrs.of optimization):
---
APK Hosts File Engine 9.0++ 32/64-bit:
http://start64.com/index.php?option=com_content&view=article&id=5851:apk-hosts-file-engine-64bit-version&catid=26:64bit-security-software&Itemid=74
(Details + benefits hosts files provide on numerous levels for speed, security, reliability, & anonymity in link)
---
* Cutting out adbanners saves me up to 40% per page on avg via the above (& do a LOT more).
---
A.) Hosts do FAR more than AdBlock ("souled-out" 2 GOOGLE & crippled by default) + Ghostery (Advertiser owned) - "Foxes guarding the henhouse", or Request Policy -> http://yro.slashdot.org/comments.pl?sid=4127345&cid=44701775
B.) Hosts add reliability vs. downed DNS & protect vs redirected DNS + secure vs. known malicious hosts-domains also -> http://tech.slashdot.org/comments.pl?sid=3985079&cid=44310431 & less added "moving parts" complexity room for breakdown,
C.) Hosts files yield more speed (blocks ads & hardcode fav sites - faster resolves vs remote DNS), security (vs. malicious domains serving mal-content + spam/phish links), reliability (vs. downed DNS or vs. Kaminsky vulnerable DNS, 99% = unpatched vs. it & worst @ ISP level + weak vs FastFlux + DynDNS botnets), & anonymity (vs. dns request logs/DNSBL's).
---
("Less is more" = GOOD engineering - vs. slowing down already SLOWER usermode browsers layering on MORE in addons that are known to slow 'em down more? I work w/ what you already have in kernelmode via hosts: A tightly integrated PART of the IP stack itself!)
APK
P.S.=> "The premise is, quite simple: Take something designed by nature & reprogram it to make it work FOR the body, rather than against it..." - Dr. Alice Krippen "I AM LEGEND"
...apk
Via the TCP/IP stack itself & custom hosts files http://hardware.slashdot.org/comments.pl?sid=4211601&cid=44848413 & ANY DEVICE with a BSD derived IP stack (most all, IF not all today) can use 'em: Truly "universal" & ubiquitous!
* "Layered-Security"/"Defense-in-Depth" = a GREAT idea (using both, yours & hosts + other methods)?
NOT ALL ROUTERS CAN DO WHAT YOU SPEAK OF!
(Not enough RAM = cause for LARGER data sets).
The beauty & utility (for you in particular) of my app's that transfer of data it imports for purposes noted below CAN be done easily to a router too since it's just text data (blocking address + host/domain name) easily edited (unlike PAC files, AdBlock regexp lists (total mess), etc.) with less "moving parts" for breakdown, AND, running in a faster level of privelege too, starting LONG before browser addons do (which slow up browsers, fact).
(Thus, adding yet another data source for you to utilize to protect yourself as you see fit using routers!).
APK
P.S.=> Custom hosts files, by themselves, work for ADDED:
1.) Speed
2.) Security
3.) Reliability
4.) Anonymity to an extent
FAR better than other 'solutions' (bought out & crippled by default by advertisers (e.g. - Ghostery/AdBlock) + they're also just plain NOT as capable (ghostery/adblock/request policy) since they don't DO NEARLY AS MUCH FOR YOU, vs. hosts) by far, on far more levels: EVEN SHORING UP DNS PROBLEMS!
(Natively/built-in & TIGHTLY integrated to the IP stack itself, courtesy of the tightly integrated part of the IP stack itself it populates from 12 reputable & reliable sources for the data for that)
Especially since 99.9% of the malicious things blocked are host-domain name based since "fastflux" &/or dynamic dns tricks used to "recycle" & reuse malicious domains malware makers are used which also take advantage of DNS' weaknesses too & so are ads it blocks too (alongside OTHER threats such as spam/phishing link & more)
... apk
http://hardware.slashdot.org/comments.pl?sid=4211601&cid=44848413
* Enjoy, fellow hosts file user!
(Take a read there, & get a BETTER more comprehensive custom hosts file than you've EVER had by using it!)
APK
P.S.=> Using it, You'll get a LOT MORE SOURCES FOR DATA (all reputable & reliable, like someonewhocares, which is 1 of its sources that YOU use) using that app of mine you can even "pick & choose" from if you wish, no less!
... apk
Generate hosts & use Android Debugging Bridge (pull command) 4 transfer 2 ANDROID smartphones.
Hosts do more w/ less (1 file) @ faster levels (ring 0) vs redundant browser addons (slowing up slower ring 3 browsers) as a filter for IP stack (coded in C & load w/ OS + 1st net request & resolver queried w\ 45++ yrs.of optimization):
---
APK Hosts File Engine 9.0++ 32/64-bit:
http://start64.com/index.php?option=com_content&view=article&id=5851:apk-hosts-file-engine-64bit-version&catid=26:64bit-security-software&Itemid=74
(Benefits hosts provide on many levels for speed, security, reliability, & anonymity in link)
---
* Blocking ads saves up to 40% per site page on avg via the above (& a LOT more).
---
A.) Hosts do more than AdBlock ("souled-out" 2 GOOGLE & crippled) + Ghostery (Advertiser owned) - "Foxes guarding the henhouse", or Request Policy -> http://yro.slashdot.org/comments.pl?sid=4127345&cid=44701775
B.) Hosts add reliability vs. downed DNS & protect vs redirected DNS + secure vs. known malicious hosts-domains too -> http://tech.slashdot.org/comments.pl?sid=3985079&cid=44310431 w/ less added "moving parts" room for breakdown,
C.) Hosts files yield more speed (blocks ads & hardcodes fav sites - faster than remote DNS), security (vs. malicious domains serving mal-content + block spam/phish), reliability (vs. downed DNS or vs. Kaminsky vulnerable DNS, 99% = unpatched vs. it & worst @ ISP level + weak vs FastFlux + DynDNS botnets), & anonymity (vs. dns request logs + DNSBL's).
---
("Less is more" = GOOD engineering - vs. slowing down SLOWER usermode apps in browsers layering on MORE in addons which are known to slow them down more? I work w/ what you have in kernelmode via hosts: A tightly integrated to the IP stack!)
APK
P.S.=> "The premise is quite simple: Take something designed by nature & reprogram it to make it work FOR the body, rather than against it..." - Dr. Alice Krippen "I AM LEGEND"
...apk
Advertisers don't trust sites' counts & serve off their servers to count clicks. Nice privoxy does it but it's almost a moot 'advantage' due to how it really works. Only extremely wealthy companies can like Google for example on their own sites which is why other solutions work so well (like hosts files).