Department of Engineering

IDP: Remote camera access

Nearly all the internetted devices and machines at CUED are behind a firewall and can't be accessed from the external networks. When you use wifi you're on an external network even if you're physically inside CUED. This makes things awkward when trying to access cameras above the IDP tables. If you're logged into a desktop machine in the EIETL or DPO, using a browser with

http://idpcam1.eng.cam.ac.uk:8080/stream/video.mjpeg

will show you an IDP table because your machine and the camera are both inside CUED. To achieve the same effect with a browser on a wifi'd laptop requires more work because everything has to go through a machine called "gate.eng.cam.ac.uk". This machine is externally visible (so your laptop can get to it) and is on the CUED network (so it has access to the cameras).

So, you have to tunnel through the firewall from your laptop to the cameras using the machine called gate.

https://www.vle.cam.ac.uk/mod/page/view.php?id=11679302 has details on how to do this on your laptop, but you need to have Putty installed. If you have a Mac or Linux machine you needn't install anything extra - just open a terminal window and do

    ssh -L 8081:idpcam1.eng.cam.ac.uk:8080 YOUR_CRSID@gate.eng.cam.ac.uk

after which you can access the camera using

http://localhost:8081/stream/video.mjpeg

with a browser. In subsequent sessions you needn't re-type the ssh command - just open the terminal window again and click on the up-arrow key to retrieve the command.

Details

Many explanations are online - see for example SSH tunneling explained. They talk about ports. These are numbered virtual sockets that the computer uses to connect to the outside world.

The ssh command above connects socket 8081 on your machine to socket 8080 on idpcam1.eng.cam.ac.uk via gate.eng.cam.ac.uk. So if subsequently you refer to localhost:8081 (port 8081 on your machine) you're actually using idpcam1.eng.cam.ac.uk:8080