Le introduction

I recently moved to a new apartment with a nice garden and a bigger bedroom. Everything seemed to be perfect, the couch fits nicely and my cat loves the new garden. It all seemed too good to be true, and it was. My internet was not working, for some odd reason. After a long and hard battle I managed to fix it, and decided to blog about it in case anyone else ever faces this challenge. I have supplied the solution on the bottom of the post for the impatient people.

The quest begins

The first thing that came to mind was doing a simple “ping google.com” to see if there was any network activity at all. This failed and so I started going through my previous experiences to see if I could determine what the problem was. Thus started the adventure of making a checklist.

  • Can other device connect to the network? yes
  • Do they have internet access? yes
  • Conclusion: Machine specific. (later I learned that I was wrong.)
A rather small checklist. I was stumped, and tried to connect to one of my development servers through ssh to see if I could ping myself from there. Oddly enough, after connecting to my development server, it took me surprisingly long to realize that I had just connected to a remote server over the internet, and thus my internet _was_ working. Shocked I tried launching skype, Colloquy (IRC) and refreshing my browser. A couple of things surprised me, but also provided me with a great deal of information:
  • SSH worked
  • Skype worked
  • IRC worked
  • Browser didn’t work
  • Ping didn’t work
Aha! Something was up with port 80.

From realization to desperation

After realizing this I found myself in some unknown¬†territorium. I’ve never seen anything like this before and so I was rather surprised. This followed with me doing some random things in desperate attempts to fix it. Restarting the router, rebooting my iMac, flushing dns cache, flushing browser cache and so on. I was confused, and never stopped to think that the problem might be something in my router. Why? Because (don’t laugh) I had reset my router 7 times. So I decided to check every, single, setting on my iMac. This was a long, time-consuming but most of all fruitless attempt. I decided to see if the guys in #macosx on freenode had anything helpful to say. The first thing they asked was if I had a proxy, which I already checked. They then continued pointing out various possible settings that could cause this odd behavior, all of which I had already checked as well. Then they pointed out that it must be a setting in my router.

Like I said earlier, I already had reset the router 7 times, so I doubted it’d be a setting in there. I checked anyway. After disabling “SPI Firewall Protection” and performing a “dscacheutil -flushcache” everything worked again. Every other device got along with this perfectly, but my iMac decided not to. I’m not sure why this works, but it does. As soon as I figure out why it works I will write a follow-up.

Solution

Disable “SPI Firewall Protection” in your router and perform a “dscacheutil -flushcache” on the command line. Also, it wouldn’t hurt to check your DNS settings (to see if you have the correct settings) and test other browsers first.

Cheers