Two days ago I suddenly received a "Connection timed out" Error when trying to connect to my WLAN. I could not access the router to restart it. But since all other devices could access the WLAN just fine, I figured chances are high that the error is caused by a misconfiguration on my local machine.

I tried adjusting various settings, including:

  • delete the WLAN interface and recreate it
  • delete the password from Keychain
  • reset PRAM

At the end I even throught it might be a hardware problem.

In an act of desparation I created a new MAC adress. And what the fuck, that helped. Here is how to do it:

  1. open up the terminal and enter:

    openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
    
  2. run

    sudo ifconfig en0 ether FF:FF:FF:FF:FF:FF
    

This worked on my MacBook Air mid 2012, but if you have a different model check out this source.

I hope that helps somebody.