Saturday 14 December 2013

Students behind a firewall? Nginx to the rescue!

I teach web development on-line. Students login into an AWS virtual machine (using SSH), write the code and then view their website over the default development HTTP port - 3000. It's quick and easy. Nothing to install and the students can focus on what they're trying to learn rather than getting bogged down in some quirk of their particular installation.

A few weeks ago Ludo who's been doing beta testing for me expressed frustration that he couldn't do the exercises from work because their firewall was blocking access to the outside world on ports 22 (SSH) and 3000. I gave this problem some thought but put it on hold while preparing for my third annual web development class at the London Perl Workshop hosted by the University of Westminster.

The big day came and I walked into a lab with over thirty eager students (more than one per terminal) expecting to write code, only to discover that a few weeks earlier the university had decided to put the same firewall constraints in place. A four hour workshop turned into a one hour lecture and it was the teacher who learnt his lesson that day!

Here's my reverse proxy solution where the student can both login and view their website from behind a firewall.