I ran into some problems lately with my network. Whenever i was browsing the web, my Firefox would just not load some pages, mostly pages that i visited quite often (Wikipedia, Apple Trailers, …). I tried Safari because i thought the problem was one of the add-ons or plugins in Firefox, but Safari also failed. Could this be a problem with my operating system (Mac OSX 10.5) ? I tried bridged networking from a Ubuntu virtual machine. Seemed to work. Other computers on the network had no problems (all windooz and GNU/Linux machines).

After countless hours of searching on google, changing network cables, restarting router and switches over the past weeks, i desperately went to the #macosx channel on the freenode irc network. Users ‘frogor’ and ‘CPng|N’ both suggested that the problem could really be due to the router.

So i fired up the admin panel of my Philips router(model number SNA6500/18). I saw in the logs that the local ip of my computer was sending a lot of unanswered ‘SYN’ traffic to the ip’s of the websites that didn’t work. Google told me that this is normal, the tcp/ip stack of osx uses an option flag that causes this. Anyway, this ‘SYN Flood’ required a lot of tcp sessions and my router limited (and aborted) them, so the connections just timed out.

Long story short, on the router admin panel: Advanced Settings > Firewall > Intrusion Detection > Maximum Incomplete TCP/UDP sessions per host
change that value from 10 to 50 and you’re done.


Today i noticed that the Apple Trailers page doesn’t let you play their videos on a GNU/Linux system by default. GStreamer couldn’t open the links to the .mov files that i found in the source code of the webpage, nor could VLC Player. Seems that Apple checks for the QuickTime User Agent string.

This means, unless GStreamer Plugin can fake that User Agent, we will have to go for a less user-friendly workaround. I downloaded the trailer i wanted to see using Wget with the -U flag to change the User Agent.

Go to the apple trailer you want to download, and copy the link to the .mov file by right clicking on the (failing) Gstreamer plugin on that page and chosing ‘copy’. Alternatively you can just go browse the source and find the .mov file there.

Now open up a terminal and type this:
wget -U QuickTime/7.6.6 http://trailers.apple.com/the-link-to-your-trailer-goes-here.mov
now you can play it using VLC Player, or your favorite video player (if it supports .mov files)

That’s it!
you could also automate the process by using a greasemonkey script or a bash script as you please…
EDIT: hack, i made one for you! It’s a php script that downloads the trailer to your home/Downloads folder.
1. download the script, rename it ‘TrailerDownloader.php’ and put it in your home folder.
2. Go to the apple trailers page and choose a trailer you want to watch (click a movie poster). Then copy the url of the page.
3. Open up a terminal (make sure you got php5, php-curl, and php-cli installed) and type
php TrailerDownloader.php http://trailers.apple.com/the-url-of-the-trailer-page-goes-here and press enter.
4. You’ll be presented with all possible trailer downloads for that movie, pick a number. Then hit the up arrow on your keyboard, and add a space and the trailer number to the end of the command. like this:
php TrailerDownloader.php http://trailers.apple.com/the-url-of-the-trailer-page-goes-here 3
5. Hit enter and wait. The trailer will be downloaded to your Downloads folder.