Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Occasionally, there are apps that embed little chunks of the Internet. In most cases, this is a good thing. However, occasionally they are used to display ads.

This is annoying, especially if I've contributed to the development of the software. As a software developer that uses ads to make money, I know that I'd be fine with someone contributing via PayPal and deciding not to view the ads.

This is my situation with quite a few apps: I've contributed to their development and I don't want to be nagged with ads or otherwise. One, in particular, embeds a mini-browser to display ads.

Is there any way I could block such ads using ABP or other OS X software?

share|improve this question
    
What device do you want to block the internet on? Mac, PC, iPhone? –  KatieK Mar 27 '12 at 5:54
    
@KatieK: Mac. Oops, should have made that clear. –  JavaAndCSharp Mar 27 '12 at 10:13
add comment

2 Answers 2

up vote 3 down vote accepted

No, Adblock/Adblock Plus have to install in a browser. Any app that is not a supported browser from this list is not going to be able to make use of it.

GlimmerBlocker is one attempt to block all ads for all applications. I haven't tried it though.

share|improve this answer
    
I know on my Android tablet I have an adblocker that works for all apps (it uses dns blocking), so there might be something similar for mac. –  penguinrob Mar 27 '12 at 4:05
    
+1 for GlimmerBlocker. I've used it for years and it works great. It is a proxy service so it will work with anything that talks to the Internet, not just browsers. –  SSteve Mar 28 '12 at 0:10
add comment

You are going to want to use a hosts file to block all ads in all games. First you're going to have to find the domain name of the server that the ads are coming from. You can use a number of programs to monitor network traffic for this step. My favorite is ettercap-ng, but you might prefer Little Snitch (if you want to do this on a per-app per-port basis, then Little Snitch will be just right for you without having to modify your hosts file). Once you've determined the domain of the ad server you're wishing to block, open up /etc/hosts in your favorite terminal text editor with sudo permissions (sudo nano /etc/hosts) (the file has no extension; it's simply named hosts). Add this line to the end of the file after replacing "domain.com" with the domain you're trying to block:

127.0.0.1 domain.com

This will tell your Mac to loopback when it comes across "domain.com", thus returning nothing, which essentially gets rid of all ads from that server in every app/program/game on your Mac (keep adding more lines for each ad server, and make them all loopback to 127.0.0.1). This method will also work on JailBroken devices and Linux.

If you want to use my omnipotent hosts file that blocks nearly all ads (it was written primarily for my JailBroken iPod), knock yourself out by replacing yours with mine: http://ss.gy/u Mine works on both desktop computers and mobile devices in multiple countries/languages (primarily the United States and France).

share|improve this answer
    
Yeah, I've edited the HOSTS file before on my PC. Seems like an interesting way to tackle this problem, but a valid way nonetheless. –  JavaAndCSharp Mar 27 '12 at 10:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.