Mac VPN Setup

Posted: April 19th, 2012 | Author: | Filed under: Mac, Networking | No Comments »

I have a Mac at home, used as a media server (it’s plugged into my TV and stereo) which is on 24/7, and recently became interested in the idea of setting it up as a VPN server. There are two main reasons for this; firstly, so that I can mount its drives from my MacBook Pro wherever I might be, and secondly so that when using free wifi connections I can route my traffic securely through my VPN at home (side-benefit – using the VPN with my iPhone means that I can bypass O2’s restrictions on age-restricted material, such as b3ta.)

Most of the information I needed came from this excellent article at tinyapps.org, but there are various other aspects to the setup that I have subsequently discovered and are worth sharing.

Having followed the instructions in the linked article, I could connect to my VPN from both my MacBook Pro and iPhone, but the MBP couldn’t see the home Mac’s drives. There are a few steps I had to take to make this work.

Considerations

IP addresses:

Most domestic routers assign IP addresses in the 192.168.0.x or 192.168.1.x ranges. I setup my router to use a different subnet, 192.168.200.x, so that there will be no crossover between what the local router is serving up for IP addresses and what the iVPN is serving. In iVPN’s address range field I then chose 192.168.200.50 – 192.168.200.60.

I have also set the router to assign the home Mac a reserved IP address, so that it’s always the same.

OS X setup:

My MacBook Pro is running Lion, but I think this is the same for earlier versions. After setting up your VPN connection in System Preferences, your connections need to be set in the right order. In the Network preference pane, click on the options button under your network interfaces to choose “Set Service Order”

 

Here, HomeBase is what I’ve called my VPN connection. Then in the following window, drag your VPN connection to the top.

And click OK.

Now when connected to my VPN, in the Finder I can use command-K to connect to server, and type in my home Mac’s IP address on the home network. This is always the same as I have told the router to reserve it. ¬†My home Mac is at 192.168.200.4, so in the Connect To Server box, I type in afp://192.168.200.4. I am then prompted to log in as if I was at home.

One more thing:

I have found that the VPN service doesn’t play well with uPNP on the router. I have disabled uPNP, and set up manual port forwarding rules for all services on the network.

 

 


OS X Lion

Posted: July 26th, 2011 | Author: | Filed under: Apple, Mac | No Comments »

I was going to write a post about Lion, but @smithsocksimon’s already written what I was going to say much better than I would have. Some Lion impressions.


Life without Flash

Posted: June 23rd, 2011 | Author: | Filed under: Internet, Mac | No Comments »

Just read an interesting post by Shadoe Huard – 7 months Flashless – about, well, not using Flash for 7 months. I’ve been doing the same for some time, and it’s transformed my browsing experience.

As an iPhone addict, I’m used to having Flash content denied to me; however I’m also used to having alternatives provided to me. iPhone content developers are increasingly using HTML5 to provide iOS-accessible content, and this is coming to the desktop too.

I’ve not gone to the extreme of completely removing Flash, but I have employed workarounds. The greatest is ClickToFlash. This excellent Safari plugin disables Flash content, replacing it with a box notifying you that there is Flash content. You can then click on the box to enable the Flash content, should you wish. The benefits are tangible – pages load faster, and the fans on the MacBook don’t whir up to 10000000 rpm!.

There are a few sites out there that are still sadly heavily Flash reliant. I’m a Liverpool fan, so I visit liverpoolfc.tv every day. This site unfortunately uses a great deal of Flash navigation. The good thing is that ClickToFlash offers the option automatically to enable Flash content on a site-by-site basis. This means that the site displays as it is meant to without me having manually to enable the content on every visit.

YouTube is of course another Flash-based site. ClickToFlash however blocks the Flash video and serves up the HTML5 video that they provide anyway for iOS devices. The result is much lower processor overheads for watching web video. Not just YouTube – Vimeo is also served up as HTML5.

Probably the most insidious usage of Flash however is advertising. A combination of ClickToFlash and the methods outlined in my recent post about ad-blocking mean that you can view websites in peace. A problem with Flash is that hovering the mouse over a Flash ad normally doesn’t show where the link goes to, so it can be difficult to find the server to add to my block list. Techniques have also been developed to obfuscate the link in the source code, so just blocking the Flash full stop does the trick.


Simple common sense

Posted: June 22nd, 2011 | Author: | Filed under: Internet, Mac | No Comments »

A few weeks ago there was a great hullabaloo about the first large-ish scale trojan to hit Mac OS X. MAC Defender and its variants were heralded as the first in a wave of threats against the Mac platform, and proof that we Mac users were about to be knocked from our smug high horses.

Well, let’s get this into perspective. OS X is now nearly 10 years old, and this is the first instance of a piece of malware running wild. And the thing is, it’s entirely avoidable (as are many Windows infestations) by using simple common sense.

Here’s a picture of a MAC Defender window.

MAC Defender

MAC Defender, from Arstechnica.com (click for large version)

This scary looking window relies purely on social engineering to make you accept its warnings. It looks like an official window, but is it? Look closely.

Firstly, there’s its name – MAC Defender. Macs are Macs, not MACS. Why the capitalisation? Then read the text. It is littered with grammatical errors and non-sensical sentences – “The largest worldwide companies trust MAC Defender their nets and security”, for example. Does this look like the work of an official product, or a bunch of scammers?

Then consider the ultimate purpose of the application – to harvest credit card numbers by making you buy their product (amusingly the window pictured shows the words “credit card” capitalised, as the creators of this trojan promise to protect you from exactly what they’re up to).

Simple common sense dictates that you do not ever type your credit card information into something that has appeared on screen unbidden.

You can protect yourself more though. A glaring flaw in the Mac’s security has always been Apple’s decision to allow downloads to open automatically. This is what has allowed this malware to infect people – visit an infected page, or click an infected link, and not only does the malware download but is able to open. You can protect yourself by turning this option off in Safari.

 

Safari preference window

Safari preferences

Make sure that the last option “Open safe files after downloading” is unchecked. Now whatever is downloaded to your machine, by choice or by not, will remain in your downloads folder until you choose to open it. If in doubt about where something came from, don’t open it. Simple common sense.


Blocking adverts in Mac OS X

Posted: June 22nd, 2011 | Author: | Filed under: Internet, Mac | No Comments »

All banner adverts come from web servers. But a Mac running OS X is a perfectly capable web server in its own right. This article describes how to tell your Mac to look for  adverts on itself, rather than wasting time and bandwidth connecting to adverts.

Due to OS X’s web serving capability, it is perfectly possible to redirect your browser into looking for ad servers’ IP addresses locally.

Of course, looking for them locally means that it won’t find what it’s looking for, and will draw a blank.

WARNING!!

This requires a bit of Terminal work, and an admin account.

The first thing to do is edit your ‘hosts’ file. This is the file that explains to your web server any custom URL resolution that you might require. The TCP/IP protocol reserves the address ‘127.0.0.1’ for the machine that you’re on, so this is what we’ll exploit. We’ll use the pico editing program for this.

First, fire up Terminal.app

Then type in:

sudo pico /etc/hosts

You’ll be prompted for your password. Then the pico editor will open, displaying something like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

Using your cursor keys, get down to the bottom of this. Now we’re going to insert a list of most known ad servers. Highlight the below list, then copy and paste it below what’s above:

127.0.0.1 123banners.com
127.0.0.1 AdSubstract
127.0.0.1 ResponseMedia-ad.flycast.com
127.0.0.1 Suissa-ad.flycast.com
127.0.0.1 UGO.eu-adcenter.net
127.0.0.1 VNU.eu-adcenter.net
127.0.0.1 ad-adex3.flycast.com
127.0.0.1 ad.adsmart.net
127.0.0.1 ad.ca.doubleclick.net
127.0.0.1 ad.adsmart.net
127.0.0.1 ad.ca.doubleclick.net
127.0.0.1 ad.de.doubleclick.net
127.0.0.1 ad.doubleclick.net
127.0.0.1 ad.es.doubleclick.net
127.0.0.1 ad.fr.doubleclick.net
127.0.0.1 ad.free6.com
127.0.0.1 ad.it.doubleclick.net
127.0.0.1 ad.iwin.com
127.0.0.1 ad.jp.doubleclick.net
127.0.0.1 ad.kr.doubleclick.net
127.0.0.1 ad.linkexchange.com
127.0.0.1 ad.linksynergy.com
127.0.0.1 ad.nl.doubleclick.net
127.0.0.1 ad.no.doubleclick.net
127.0.0.1 ad.preferences.com
127.0.0.1 ad.se.doubleclick.net
127.0.0.1 ad.sma.punto.net
127.0.0.1 ad.trafficmp.com
127.0.0.1 ad.sma.punto.net
127.0.0.1 ad.trafficmp.com
127.0.0.1 ad.uk.doubleclick.net
127.0.0.1 ad.webprovider.com
127.0.0.1 ad08.focalink.com
127.0.0.1 ad1.adcept.net
127.0.0.1 ad1.icorp.net
127.0.0.1 ad1.looksmart.com
127.0.0.1 ad2.adcept.net
127.0.0.1 ad2.looksmart.com
127.0.0.1 ad3.adcept.net
127.0.0.1 adcontroller.unicast.com
127.0.0.1 adcreatives.imaginemedia.com
127.0.0.1 addb.looksmart.com
127.0.0.1 adevents.msn.com
127.0.0.1 adex3.flycast.com
127.0.0.1 adforce.ads.imgis.com
127.0.0.1 adforce.imgis.com
127.0.0.1 adfu.blockstackers.com
127.0.0.1 adforce.imgis.com
127.0.0.1 adfu.blockstackers.com
127.0.0.1 adimage.blm.net
127.0.0.1 adimages.earthweb.com
127.0.0.1 adimages.go.com
127.0.0.1 adimages.imaginemedia.com
127.0.0.1 adimg.egroups.com
127.0.0.1 admedia.xoom.com
127.0.0.1 admonitor.net
127.0.0.1 adpick.switchboard.com
127.0.0.1 adproject.net
127.0.0.1 adremote.pathfinder.com
127.0.0.1 adres.internet.com
127.0.0.1 ads-ussj1.focalink.com
127.0.0.1 ads.ad-flow.com
127.0.0.1 ads.adflight.com
127.0.0.1 ads.admaximize.com
127.0.0.1 ads.admonitor.net
127.0.0.1 ads.adroar.com
127.0.0.1 ads.admonitor.net
127.0.0.1 ads.adroar.com
127.0.0.1 ads.bfast.com
127.0.0.1 ads.box.sk
127.0.0.1 ads.burstnet.com
127.0.0.1 ads.cdfreaks.com
127.0.0.1 ads.chrbanner.com
127.0.0.1 ads.clickagents.com
127.0.0.1 ads.clickhouse.com
127.0.0.1 ads.dai.net
127.0.0.1 ads.datais.com
127.0.0.1 ads.enliven.com
127.0.0.1 ads.eu.msn.com
127.0.0.1 ads.fairfax.com.au
127.0.0.1 ads.fool.com
127.0.0.1 ads.fortunecity.com
127.0.0.1 ads.fortunecity.fr
127.0.0.1 ads.freeze.com
127.0.0.1 ads.freshmeat.net
127.0.0.1 ads.freeze.com
127.0.0.1 ads.freshmeat.net
127.0.0.1 ads.god.co.uk
127.0.0.1 ads.guardian.co.uk
127.0.0.1 ads.hitcents.com
127.0.0.1 ads.hollywood.com
127.0.0.1 ads.i12.de
127.0.0.1 ads.i33.com
127.0.0.1 ads.ign.com
127.0.0.1 ads.imaginemedia.com
127.0.0.1 ads.indya.com
127.0.0.1 ads.infi.net
127.0.0.1 ads.irover.com
127.0.0.1 ads.ixo.com
127.0.0.1 ads.jpost.com
127.0.0.1 ads.jwtt3.com
127.0.0.1 ads.killerapp.com
127.0.0.1 ads.link4ads.com
127.0.0.1 ads.linksponsor.com
127.0.0.1 ads.link4ads.com
127.0.0.1 ads.linksponsor.com
127.0.0.1 ads.looksmart.com
127.0.0.1 ads.lycos.com
127.0.0.1 ads.lycos.de
127.0.0.1 ads.madison.com
127.0.0.1 ads.mediaodyssey.com
127.0.0.1 ads.mediaturf.net
127.0.0.1 ads.msn.com
127.0.0.1 ads.musiccity.com
127.0.0.1 ads.netomia.com
127.0.0.1 ads.newcity.com
127.0.0.1 ads.newcitynet.com
127.0.0.1 ads.ninemsn.com.au
127.0.0.1 ads.rediff.com
127.0.0.1 ads.satyamonline.com
127.0.0.1 ads.seattletimes.com
127.0.0.1 ads.smartclicks.com
127.0.0.1 ads.smartclicks.net
127.0.0.1 ads.smartclicks.com
127.0.0.1 ads.smartclicks.net
127.0.0.1 ads.sptimes.com
127.0.0.1 ads.startpath.com
127.0.0.1 ads.station.sony.com
127.0.0.1 ads.tiscali.fr
127.0.0.1 ads.tripod.com
127.0.0.1 ads.tucows.com
127.0.0.1 ads.vcommunities.com
127.0.0.1 ads.web.aol.com
127.0.0.1 ads.x10.com
127.0.0.1 ads.xtra.co.nz
127.0.0.1 ads.zdnet.com
127.0.0.1 ads01.focalink.com
127.0.0.1 ads02.focalink.com
127.0.0.1 ads03.focalink.com
127.0.0.1 ads04.focalink.com
127.0.0.1 ads05.focalink.com
127.0.0.1 ads06.focalink.com
127.0.0.1 ads05.focalink.com
127.0.0.1 ads06.focalink.com
127.0.0.1 ads07.focalink.com
127.0.0.1 ads08.focalink.com
127.0.0.1 ads09.focalink.com
127.0.0.1 ads1.activeagent.at
127.0.0.1 ads1.ad-flow.com
127.0.0.1 ads1.speedbit.com
127.0.0.1 ads10.focalink.com
127.0.0.1 ads11.focalink.com
127.0.0.1 ads12.focalink.com
127.0.0.1 ads13.focalink.com
127.0.0.1 ads14.focalink.com
127.0.0.1 ads15.focalink.com
127.0.0.1 ads16.focalink.com
127.0.0.1 ads17.focalink.com
127.0.0.1 ads18.focalink.com
127.0.0.1 ads19.focalink.com
127.0.0.1 ads2.speedbit.com
127.0.0.1 ads19.focalink.com
127.0.0.1 ads2.speedbit.com
127.0.0.1 ads2.zdnet.com
127.0.0.1 ads20.focalink.com
127.0.0.1 ads21.focalink.com
127.0.0.1 ads22.focalink.com
127.0.0.1 ads23.focalink.com
127.0.0.1 ads24.focalink.com
127.0.0.1 ads25.focalink.com
127.0.0.1 ads3.speedbit.com
127.0.0.1 ads3.zdnet.com
127.0.0.1 ads4.speedbit.com
127.0.0.1 ads5.gamecity.net
127.0.0.1 ads5.speedbit.com
127.0.0.1 ads6.speedbit.com
127.0.0.1 ads7.speedbit.com
127.0.0.1 ads8.speedbit.com
127.0.0.1 adserv.bravenet.com
127.0.0.1 adserv.bravenet.com
127.0.0.1 adserv.bravenet.com
127.0.0.1 adserv.bravenet.com
127.0.0.1 adserv.iafrica.com
127.0.0.1 adserv.internetfuel.com
127.0.0.1 adserv.quality-channel.de
127.0.0.1 adserver.affiliation.com
127.0.0.1 adserver.akqa.net
127.0.0.1 adserver.dbusiness.com
127.0.0.1 adserver.garden.com
127.0.0.1 adserver.humanux.com
127.0.0.1 adserver.imaginemedia.com
127.0.0.1 adserver.isonews.com
127.0.0.1 adserver.janes.com
127.0.0.1 adserver.lunarpages.com
127.0.0.1 adserver.merc.com
127.0.0.1 adserver.monster.com
127.0.0.1 adserver.track-star.com
127.0.0.1 adserver.tweakers.net
127.0.0.1 adserver.ugo.com
127.0.0.1 adserver.tweakers.net
127.0.0.1 adserver.ugo.com
127.0.0.1 adserver.webads.nl
127.0.0.1 adserver1.ogilvy-interactive.de
127.0.0.1 adserver2.imaginemedia.com
127.0.0.1 adsubstract
127.0.0.1 adtegrity.spinbox.net
127.0.0.1 adulttds.com
127.0.0.1 aglink.mircx.com
127.0.0.1 antfarm-ad.flycast.com
127.0.0.1 ar.atwola.com
127.0.0.1 au.ads.link4ads.com
127.0.0.1 bach.aureate.com
127.0.0.1 badservant.guj.de
127.0.0.1 banner-net.com
127.0.0.1 banner.50megs.com
127.0.0.1 banner.adverity.com
127.0.0.1 banner.commissionpartner.com
127.0.0.1 banner.de
127.0.0.1 banner.commissionpartner.com
127.0.0.1 banner.de
127.0.0.1 banner.easyspace.com
127.0.0.1 banner.free6.com
127.0.0.1 banner.i-3.de
127.0.0.1 banner.media-system.de
127.0.0.1 banner.orb.net
127.0.0.1 banner.relcom.ru
127.0.0.1 bannerad.ipgnet.com
127.0.0.1 bannerads.de
127.0.0.1 bannerfarm.ace.advertising.com
127.0.0.1 bannerimages.0catch.com
127.0.0.1 bannermaster.geektech.com
127.0.0.1 bannerpower.com
127.0.0.1 banners.adultfriendfinder.com
127.0.0.1 banners.easydns.com
127.0.0.1 banners.free6.com
127.0.0.1 banners.hotlinks.net
127.0.0.1 banners.looksmart.com
127.0.0.1 banners.hotlinks.net
127.0.0.1 banners.looksmart.com
127.0.0.1 banners.nextcard.com
127.0.0.1 banners.pennyweb.com
127.0.0.1 banners.webmasterplan.com
127.0.0.1 banners.wunderground.com
127.0.0.1 bannervip.webjump.com
127.0.0.1 banzai.moodlogic.com
127.0.0.1 barnesandnoble.bfast.com
127.0.0.1 beseen.com
127.0.0.1 beseen.looksmart.com
127.0.0.1 beseen5.looksmart.com
127.0.0.1 beseenad.looksmart.com
127.0.0.1 beseenad1.looksmart.com
127.0.0.1 beseenad2.looksmart.com
127.0.0.1 beseenad3.looksmart.com
127.0.0.1 beseenadx.looksmart.com
127.0.0.1 bfast.com
127.0.0.1 bizad.nikkeibp.co.jp
127.0.0.1 bfast.com
127.0.0.1 bizad.nikkeibp.co.jp
127.0.0.1 bn.bfast.com
127.0.0.1 botw.topbucks.com
127.0.0.1 bsads.looksmart.com
127.0.0.1 by.advertising.com
127.0.0.1 c1.thecounter.com
127.0.0.1 c2.thecounter.com
127.0.0.1 c3.xxxcounter.com
127.0.0.1 califia.imaginemedia.com
127.0.0.1 cash4banner.com
127.0.0.1 cash4banner.de
127.0.0.1 cds.mediaplex.com
127.0.0.1 cgi.sexlist.com
127.0.0.1 click.avenuea.com
127.0.0.1 click.go2net.com
127.0.0.1 click.linksynergy.com
127.0.0.1 clickagents.com
127.0.0.1 clicks.about.com
127.0.0.1 clickagents.com
127.0.0.1 clicks.about.com
127.0.0.1 clit5.sextracker.com
127.0.0.1 clk.adtmt.com
127.0.0.1 clk.atdmt.com
127.0.0.1 code02.pbtech.net
127.0.0.1 commonwealth.riddler.com
127.0.0.1 cookies.cmpnet.com
127.0.0.1 cornflakes.pathfinder.com
127.0.0.1 counter.hitbox.com
127.0.0.1 counter1.sextracker.com
127.0.0.1 counter10.sextracker.com
127.0.0.1 counter11.sextracker.com
127.0.0.1 counter12.sextracker.com
127.0.0.1 counter13.sextracker.com
127.0.0.1 counter14.sextracker.com
127.0.0.1 counter15.sextracker.com
127.0.0.1 counter16.sextracker.com
127.0.0.1 counter2.sextracker.com
127.0.0.1 counter16.sextracker.com
127.0.0.1 counter2.sextracker.com
127.0.0.1 counter3.sextracker.com
127.0.0.1 counter4.sextracker.com
127.0.0.1 counter5.sextracker.com
127.0.0.1 counter6.sextracker.com
127.0.0.1 counter7.sextracker.com
127.0.0.1 counter8.sextracker.com
127.0.0.1 counter9.sextracker.com
127.0.0.1 crs.akamai.com
127.0.0.1 crux.songline.com
127.0.0.1 ct.iac-online.de
127.0.0.1 ctc.amateurpages.com
127.0.0.1 de.netstatpro.net
127.0.0.1 desktop.grokster.com
127.0.0.1 dialer.offshoreclicks.com
127.0.0.1 doubleclick.net
127.0.0.1 download1.libereco.net
127.0.0.1 ehg-commjun.hitbox.com
127.0.0.1 download1.libereco.net
127.0.0.1 ehg-commjun.hitbox.com
127.0.0.1 ehg.hitbox.com
127.0.0.1 erie.smartage.com
127.0.0.1 etad.telegraph.co.uk
127.0.0.1 everyone.net
127.0.0.1 exchange-it.com
127.0.0.1 exitfuel.com
127.0.0.1 exitmoney.com
127.0.0.1 fast.mediacharger.com
127.0.0.1 focalink.com
127.0.0.1 fp.valueclick.com
127.0.0.1 fragmentserv.iac-online.de
127.0.0.1 freebieclub.com
127.0.0.1 freeezinebucks.com
127.0.0.1 freepass.elitecities.com
127.0.0.1 fs.dai.net
127.0.0.1 gadgeteer.pdamart.com
127.0.0.1 global.msads.net
127.0.0.1 gadgeteer.pdamart.com
127.0.0.1 global.msads.net
127.0.0.1 gm.preferences.com
127.0.0.1 go.ezgreen.com
127.0.0.1 got2goshop.com
127.0.0.1 gp.dejanews.com
127.0.0.1 hacker-spider.de
127.0.0.1 hc2.humanclick.com
127.0.0.1 hg1.hitbox.com
127.0.0.1 hit.hotlog.ru
127.0.0.1 hitbox.com
127.0.0.1 hitmatic.com
127.0.0.1 hitsfrom.popuprush.com
127.0.0.1 hypercount.com
127.0.0.1 ifcol.exitfuel.com
127.0.0.1 image.click2net.com
127.0.0.1 image.com.com
127.0.0.1 image.eimg.com
127.0.0.1 images.sexlist.com
127.0.0.1 image.eimg.com
127.0.0.1 images.sexlist.com
127.0.0.1 images2.nytimes.com
127.0.0.1 img.mediaplex.com
127.0.0.1 impnl.tradedoubler.com
127.0.0.1 internetfuel.com
127.0.0.1 itn.adbureau.net
127.0.0.1 jcms.cydoor.com
127.0.0.1 jeeves.flycast.com
127.0.0.1 jobkeys.ngadcenter.net
127.0.0.1 kansas.valueclick.com
127.0.0.1 leader.linkexchange.com
127.0.0.1 linkbuddies.com
127.0.0.1 liquidad.narrowcastmedia.com
127.0.0.1 liveadvert.com
127.0.0.1 ln.doubleclick.net
127.0.0.1 looksmartclicks.com
127.0.0.1 lsads.looksmart.com.au
127.0.0.1 m.doubleclick.net
127.0.0.1 lsads.looksmart.com.au
127.0.0.1 m.doubleclick.net
127.0.0.1 m2.doubleclick.net
127.0.0.1 macaddictads.snv.futurenet.com
127.0.0.1 marketing-internet.com
127.0.0.1 maximumcash.com
127.0.0.1 maximumpcads.imaginemedia.com
127.0.0.1 media.carpediem.fr
127.0.0.1 media.expedia.com
127.0.0.1 media.fastclick.net
127.0.0.1 media.popuptraffic.com
127.0.0.1 media.preferences.com
127.0.0.1 media20.fastclick.net
127.0.0.1 mediacharger.com
127.0.0.1 mediamgr.ugo.com
127.0.0.1 mediaplex.com
127.0.0.1 megacash.de
127.0.0.1 mercury.rmuk.co.uk
127.0.0.1 millenium-hitz.com
127.0.0.1 mercury.rmuk.co.uk
127.0.0.1 millenium-hitz.com
127.0.0.1 mjxads.internet.com
127.0.0.1 mojofarm.sjc.mediaplex.com
127.0.0.1 monitor.looksmart.com
127.0.0.1 monsterhitz.to
127.0.0.1 musiccity.streamcastnetwork.com
127.0.0.1 n24.de
127.0.0.1 nbc.adbureau.net
127.0.0.1 newads.cmpnet.com
127.0.0.1 ng3.ads.warnerbros.com
127.0.0.1 ngads.smartage.com
127.0.0.1 nitrous.exitfuel.com
127.0.0.1 nsads.hotwired.com
127.0.0.1 ntbanner.digitalriver.com
127.0.0.1 oad.realmedia.com
127.0.0.1 oas.benchmark.fr
127.0.0.1 onresponse.com
127.0.0.1 onresponse.com
127.0.0.1 onresponse.com
127.0.0.1 onresponse.com
127.0.0.1 p.wtlive.com
127.0.0.1 paycounter.com
127.0.0.1 ph-ad04.focalink.com
127.0.0.1 ph-ad05.focalink.com
127.0.0.1 ph-ad07.focalink.com
127.0.0.1 ph-ad16.focalink.com
127.0.0.1 ph-ad17.focalink.com
127.0.0.1 ph-ad18.focalink.com
127.0.0.1 php.offshoreclicks.com
127.0.0.1 pluto.beseen.com
127.0.0.1 proxy.ladot.com
127.0.0.1 pub.epiknet.org
127.0.0.1 pub.infiniland.com
127.0.0.1 pub.ketix.com
127.0.0.1 pub.telmedia.fr
127.0.0.1 pub.weborama.fr
127.0.0.1 realads.realmedia.com
127.0.0.1 pub.weborama.fr
127.0.0.1 realads.realmedia.com
127.0.0.1 redherring.ngadcenter.net
127.0.0.1 redirect.click2net.com
127.0.0.1 redirect.iac-online.de
127.0.0.1 regio.adlink.de
127.0.0.1 retaildirect.realmedia.com
127.0.0.1 rs.webmasterplan.com
127.0.0.1 s0.bluestreak.com
127.0.0.1 s1.bluestreak.com
127.0.0.1 s10.sitemeter.com
127.0.0.1 s11.sitemeter.com
127.0.0.1 s12.sitemeter.com
127.0.0.1 s2.bluestreak.com
127.0.0.1 s2.focalink.com
127.0.0.1 s3.bluestreak.com
127.0.0.1 s4.bluestreak.com
127.0.0.1 s5.bluestreak.com
127.0.0.1 s6.bluestreak.com
127.0.0.1 s5.bluestreak.com
127.0.0.1 s6.bluestreak.com
127.0.0.1 s7.bluestreak.com
127.0.0.1 s8.bluestreak.com
127.0.0.1 script.weborama.fr
127.0.0.1 secserv.imgis.com
127.0.0.1 servedby.advertising.com
127.0.0.1 servedby.advertising.com
127.0.0.1 servedby.advertwizard.com
127.0.0.1 server-uk.imrworldwide.com
127.0.0.1 server.hamster.com
127.0.0.1 servlets.kliks.nl
127.0.0.1 sextracker.com
127.0.0.1 sh4banner.de
127.0.0.1 sh4sure-images.adbureau.net
127.0.0.1 shop.freepush.com
127.0.0.1 specialoffers.aol.com
127.0.0.1 spezialreporte.de
127.0.0.1 spin.spinbox.net
127.0.0.1 spezialreporte.de
127.0.0.1 spin.spinbox.net
127.0.0.1 sprinks-clicks.about.com
127.0.0.1 spylog.com
127.0.0.1 srv1.bannercommunity.de
127.0.0.1 srv2.bannercommunity.de
127.0.0.1 srv3.bannercommunity.de
127.0.0.1 static.admaximize.com
127.0.0.1 stats.superstats.com
127.0.0.1 stats3.porntrack.com
127.0.0.1 statse.webtrendslive.com
127.0.0.1 survey.proactive.nl
127.0.0.1 sview.avenuea.com
127.0.0.1 t0.extreme-dm.com
127.0.0.1 thinknyc.eu-adcenter.net
127.0.0.1 tpl1.realtracker.com
127.0.0.1 tracker.clicktrade.com
127.0.0.1 tribalfusion.speedera.net
127.0.0.1 tsms-ad.tsms.com
127.0.0.1 tribalfusion.speedera.net
127.0.0.1 tsms-ad.tsms.com
127.0.0.1 tuerck.de.counted.com
127.0.0.1 twistedhumor.com
127.0.0.1 ugo.eu-adcenter.net
127.0.0.1 uk1.linksynergy.com
127.0.0.1 uk2.linksynergy.com
127.0.0.1 uk3.linksynergy.com
127.0.0.1 uk4.linksynergy.com
127.0.0.1 uk5.linksynergy.com
127.0.0.1 us.adserver.yahoo.com
127.0.0.1 v0.extreme-dm.com
127.0.0.1 v1.extreme-dm.com
127.0.0.1 valueclick.com
127.0.0.1 van.ads.link4ads.com
127.0.0.1 vant.guj.de
127.0.0.1 view.accendo.com
127.0.0.1 view.avenuea.com
127.0.0.1 vis1.sexlist.com
127.0.0.1 view.avenuea.com
127.0.0.1 vis1.sexlist.com
127.0.0.1 vis2.sexlist.com
127.0.0.1 vis3.sexlist.com
127.0.0.1 vis4.sexlist.com
127.0.0.1 vis5.sexlist.com
127.0.0.1 visite.weborama.fr
127.0.0.1 w0.extreme-dm.com
127.0.0.1 w113.hitbox.com
127.0.0.1 w117.hitbox.com
127.0.0.1 w25.hitbox.com
127.0.0.1 web2.deja.com
127.0.0.1 webads.bizservers.com
127.0.0.1 weblist.de
127.0.0.1 webxprod.qualcomm.com
127.0.0.1 altfarm.mediaplex.com

Now, notice what they’ve all got in common? That’s right, they all start with 127.0.0.1. This is telling your browser that instead of looking for these ad servers via the internet, it should look for them on your machine.
You’re going to have to quit pico now and save this, so hit ctrl-o to save, then ctrl-x to quit.

OK, this is all well and good, but what exactly is your browser going to look for on your machine? It doesn’t know, and nor does your Mac, yet. If you run this as it is, you’ll just get pages full of “Error, page not found” which are potentially just as annoying as the ads.
Solution? Make a blank page. Fire up your favourite text editor (BBEdit, TextEdit, or suchlike), make a new document, and TYPE NOTHING INTO IT.

Now save this as “missing.html” into your server directory. Make sure there’s no other extensions applied to that, like ‘.txt’, or ‘.rtf’. Your server directory is your_harddrive/Library/WebServer/Documents

Now, just one step left. We need to tell the Apache web server what to do when it comes across an advert but is instructed to look locally. We need to edit its configuration file so that it displays our newly created “missing.html”.

Back to Terminal.

Fire up Terminal, and type

sudo pico /etc/httpd/httpd.conf

Again, you’ll be asked for your admin password. So type it in.

We need to find the bit relating to how Apache will deal with local requests specified by the hosts file we just pasted loads of lines into. It’s a big file, so let’s do a search. Hit ctrl-W for “where is”, and type ‘local redirects’. Provided you haven’t got some weirdo super-customised httpd file, this should drop you straight to the line saying:

# 2) local redirects

Underneath this is what we have to change. Whatever it says after ‘ErrorDocument 404’, change it so that it looks like this:

ErrorDocument 404 /missing.html

Notice something missing? That’s right, make sure you take the # off the beginning of the line.

That’s us done here, so let’s save and exit. Remember? ctrl-o to save, then ctrl-x to exit.

OK, there’s one last step. We have to restart Apache to make it recognise the changes we’ve made.
So open System Preferences, choose Sharing, turn off Web Sharing, then turn it on again.

And that’s it. For future reference: It’s almost impossible to maintain an exhaustive list of ad servers; they change all the time. But if you find one that’s getting through, do let me know. I’ll add it to the list. ASAP.