MVP hosts is a good start if you’re looking to block advertisements-serving domains.

However, wildcard domains; e.g. “*” and sub-domains “” do not work correctly. Furthermore, if you’re a network administrator — I administer my home network — the effect is not propagated for all clients.

Aside, the large filesize (~16k lines) means reduced performance, since there are entries like “”, “”. Typically, the entire domain should be blocked — although we might end up blacklisting “good” domains; e.g. “”, the end result is mostly desirable.

Since my TL-WR841N is fairly competent; i.e. it allows a dot-prefixed domain; e.g. “” works correctly as expected, I wrote a script to extract, and process the contents of hosts.txt into ~7k lines, which is a bit more acceptable.

Now, I just need to figure out how to add more than 4 domains to a rule.

If you’re interested in the source, you can find it here.


xDSL Internet connection sharing

Want to share your xDSL Internet connection? Try out the following guide. Note that this guide comes without any guaranty of any sort, you’re on your own here.

If that’s fine with you, read on.

You’ll need three devices:

  1. xDSL modem;
  2. A (optionally wireless) router;
  3. One (or more) host machines.

Some of the newer xDSL modems have additional functionality, but we shall focus on making the modem act as a bridge, a so-called dumb device, between the Wide Area Network (WAN, or the Internet) and your Local Area Network (LAN), which is your router and host machine(s).

If you already have an existing xDSL service, you will already own a modem and host machine, so all you will need in addition is a router; I recommend the Linksys WRT54G (or WRT54C is OK too), which has served me (and my friends) faithfully.

Your xDSL modem has at least four ports (Power, USB, Telephone, Ethernet). We will focus on the Telephone and Ethernet ports. If your modem has more than one Ethernet port, it means that your modem is an all-in-one device with WAN/LAN functionality, so you won’t be needing to read any further!

So suppose we only have one host machine; the final setup should look like the following. where ‘—–‘ represents a Ethernet cable, which looks like a (fat) telephone cable.

xDSL modem [Ethernet port] —– [Internet port] Router [Ethernet port 1] —– [Ethernet port] Host machine

But first we need to set the modem to bridge mode. Connect as follows:

xDSL modem [Ethernet port] —– [Ethernet port] Host machine

Now you need to access the modem’s web interface (assuming it is a fairly modern device!). Make sure your Ethernet connection is set to ‘DHCP’, so that the host machine gets a local Internet Protocol (IP) address. I will be using the default 192.168.1.x convention. Now our machine has an IP address like (or whatever, just as long as it is different from the modem). The gateway (modem) should be, and we can then access the web GUI using the browser like

Each web interface differs, but you should be looking for ‘bridge’ mode. Set it to bridge mode, and disable DHCP. The modem will restart, and the machine will no longer have an IP address (because DHCP is disabled). Now we connect as follows:

Router [Ethernet port 1] —– [Ethernet port] Host machine

The router should be configured to PPPoE (xDSL) mode — you will be prompted for the username and password to the DSL service with your Internet Service Provider (ISP). Also set the router IP address like and enable DHCP. Remember that the IP address must differ from the address of the modem; e.g.

xDSL modem []
Router []

You can ask the router to begin allocation host machine addresses from a certain number onwards; e.g. 10. So the first host machine would be:

Host machine []

Now let’s set everything to its final connection state:

xDSL modem [Ethernet port] —– [Internet port] Router [Ethernet port 1] —– [Ethernet port] Host machine

Note that you cannot access your modem’s web GUI anymore; instead access your router’s web GUI at Let’s log in, and click the ‘Connect’ button (you’ll find it somewhere!). If everything works out, your router will receive a WAN IP address from the ISP, and you’re good to go!

Setup a Mac-based Local Area Network (LAN)

I was asked to setup a “connection the Internet on my Mac” yesterday. In Singapore, we have this Wireless@SG service which basically allows people with a wifi card to connect to the Internet in most town-y areas. The lady said she would connect via Wireless@SG, and I was pretty confident I could do it in less than 15 minutes, so I expressed my opinion. Let’s see how long I took in the end.

Come today, I found that it wasn’t setting up the Internet connection (easy), it was to setup their Windows (bad), running in Parallel Desktops (bad setup, good software) with host OS Tiger Macs (good) to be able to talk to each other. The router is an Airport Extreme (good). The purpose of the local network was to share data — they were using a Windows software to manage their clients and appointments, and this is basically a single-user application that stores data in an .mdb file. Of course, me being a web developer, trust me to launch into my sales pitch about web applications and their portability/accessibility. Time: 15 minutes.

To begin with, the Airport Extreme was not turned on, so no network. Now I have never setup an Airport Extreme before, and so I thought it was like my Linksys router, with a web interface. Unfortunately this was not the case. The manual helped though — a reset and then I had setup the WPA wireless network. Time: 15 minutes.

I was freaking out at this point because I was way over schedule, and I had never successfully setup a network where the guest OS (Windows) were able to communicate with each other. Thankfully the Parallels Desktop documentation was excellent. The default setup was for “shared networking”, so I had to change it to a “bridged network”, such that the router now sees four machines: two Macs, two Windows. I have used VMWare before thankfully, and this looked really similar. Time: 20 minutes.

The Windows version was XP SP2, and luckily the networking was setup correctly, workgroup MSHOME, and I was able to setup a shared folder to access the application. Time: 15 minutes.

They had an IT guy, so we messed around with the data a bit — performance was piss-poor, for some reason — and we confirmed that the data was indeed shared. Time: 10 minutes.

The lady announced that she wanted the printer to be setup as well. I freaked out (again), but was calm on the outside. I messed around with the USB printer for a bit, then announced I would not setup the printer. Chances was that I would have to setup the printer on the Macs, and then in Windows, so no thanks. Time: 15 minutes.

The lady brought out another laptop, an Asus S6. Wireless connection to Airport was fine, but when I used the “My Network Places”, I was able to see (but not browse) the other two Windows machines. I twiddled my thumbs for awhile, and then I decided it was the fault of the software used to connect to the Airport. This was non-standard, and I was missing the “Authentication” tab when viewing the adapter settings, so I figured it was that. Switched over to the Windows one, and I found that only WEP was supported. WPA wasn’t an available option. Time: 15 minutes.

I decided to set the AirPort to use a WEP encryption instead. The Mac outside was wired, so there was no downtime. The Mac in the treatment room did not register the change, and to my horror I found that there was no way to choose what encryption method would be used. Great. I waited 5 minutes, and then it connected to the AirPort via WEP. Without any interference from me. Time: 15 minutes.

I had taken 120 minutes, 10 times longer than what I had predicted. Of course, I had estimated a totally different task, but its here to illustrate the fact that estimating effort is like winning the lottery sometimes — its tough.

And the sad fact is… I got a call from the lady again. Wireless@SG is apparently not working — Safari is not supported?!? Argh. I have to head down again tomorrow, or rather, later at 9am. Excellent productivity.

The unnecessary pain of…

… setting up a home network.

I finally got down to setting up my old wireless router for a friend yesterday. Its a D-Link DI-624+. Now this should have be a relatively painless activity since I had set it up successfully before myself after 1-2 days of Internet-less pain. It was more about the DSL modem settings rather than the router! Now my friend uses a cable modem from SCV MaxOnline, a black box so to speak. Good, one less thing to worry about. Basically the setup is as follows:

1. The cable service provider assigns the external IP address to the modem;
2. The modem hooks up with the router;
3. The router assigns internal IP addresses to its clients (desktops, laptops).

I reset the router to the default settings (DHCP) and it was fine with the IBM Centrino laptop. Wired of course. Then we setup data encryption and wireless connectivity. Voila! Wired and wireless is fine. IBM laptops have their own network configuration software, and it was comprehensive enough that I could get wireless connectivity up and running within 5 minutes.

Time elapsed: 25 mins, inclusive of cleaning the top shelves for a place to put the modem and router and the fact that I had no mouse!

Now we go over to this Acer laptop in another room. Centrino as well. it should be a piece of cake because I just need to key in the wlan ssid and the network key. I use the Windows one, since Acer doesn’t provide the IBM equivalent of the network configuration software. But for some reason the internal IP for the Acer is incorrect, even though I’d made sure that the settings are the same. It doesn’t help that the laptop seems to having some virus/adware issues and slow as hell. I try various combinations to no avail.

Time elapsed: 1 hour 30 mins(?!?), inclusive of booting and rebooting the laptop into Windows.

I finally decide to shift the modem and router into the Acer room, wireless be damned. Billy Bombers was calling out to me. Within 2 seconds, the network card gets a correct IP address and Internet access is fine now.

Time elapsed: 1 hour 35 mins.

So… what was the issue? I used a workaround, but its simply not satisfying. It just might be the router? I should go upgrade the firmware the next time I’m down. Maybe that will help.


The local D-Link website navigates like:

Tech Support -> Drivers & Updates -> Wireless -> DI-624+

I would expect firmware updates and the link to be hosted here, but its just a product page with some setup information. Perfect.