I'm using the open source Motion CCTV/webcam software to allow me to view my camera live over a network. Internally, I can go to my web browser, type in the URL which is something like http://nameofmyubuntuserver:8081.

That will take me to my camera's live feed.

Now I could port forward that to access it remotely, but there's the potential of someone seeing that address by something like analysing packets.

Is there any way to secure that address? I'm running Motion on Ubuntu Server 11.04.

Preferably I'd like to make it go through https as well as prompt for a password. I found this but it seems so complex. Is there an Ubuntu package which can allow me to access that address after authenticating myself and encrypting the connection? It doesn't even have to be Motion-specific. I'm just looking for an easier way to encrypt and authenticate a locally-hosted http site.

Or even better, an Ubuntu package that creates me a new website with authentication and https (preferably something simple, Apache scares me), which then redirects to my local site in a secure manner?


Is using ssh an option? In this case you can just tunnel the HTTP connection through your encrypted and authenticated SSH channel. Run at the remote client:

ssh user@yourUbuntuServer -L 10000:

Then, point your browser at http://localhost:10000

It is also possible to set up a HTTPS server that acts as proxy for your HTTP service, e.g. with Apache. However, this will hardly be less scary than Apache.

|improve this answer|||||
  • Trying to perform that command on Android but will need to root phone first. Is there a command I can use AFTER ssh-ing into my server, which I can run on the server, to send the web page to my local browser through SSH? – nLinked Oct 27 '11 at 22:05

You need to set up Apache (or other webserver), configure SSL on it and make it to proxy your application running on :8081

I don't know of a package which will do this for you. If Apache scares you you may try nginx or lighttpd, but there still will be some manual configuration.

I also think you will get better answers on some other stackexchange site because technically it's not Ubuntu-specific.

|improve this answer|||||

The following guides might be helpful in setting up your http server to use OpenSSL for encryption:



|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.