Wednesday, September 24, 2014

Keeping Your WAN SSH Session Alive

Your ISP might kill an idle SSH session (why?). So, if you're using Putty, here's what you can do :

(yes, it's that simple)

Just set this number to 10 - every 10 seconds, it'll send a keep-alive packet..


Handy for Raspberry Pi hacking - so says the Right Honourable Harry Perkins, steelworker from Sheffield.

Sunday, September 21, 2014

Cheezy Surveillance System with Better UI

Would you like to set up a $5 (Fry's) webcam in your home and be able to look at it from anywhere on your phone?

If yes, then...

(assumes fswebcam is installed on your Raspberry Pi and you have a cron job (see older post:)  to take a photo ever so often and that pic is being saved at ~/Desktop/snapshot.jpg)

Last year, I had an Airbnb guest stay at my place when I left town. I only cared about the garage being secure. So, I set up a pi-connected-webcam there. I had to use an SFTP client on my phone to pull the pic each time. We (my smarter buddy who helped me with the setup) couldn't get HTTP to do it..

Today, we figure out that it's just that Cox is blocking port 80 (HTTP). (My buddy ran nmap to reach the conclusion)

So, pick another port - maybe 1025 and, in your (assuming you've installed lighttpd as your webserver :) ) /etc/lighttpd/lighttpd.conf, change to see :

server.port      = 1025

Now, in your /var/www, you need a link to the snapshot.jpg, so do :

(after you cd to /var/www)

(might have to do sudo)

ln -s ~pi/Desktop/snapshot.jpg

Then, you can, in a browser, even on your phone,

whatever.wherever.org:1025/snapshot.jpg

See older post on how you can get the whatever.wherever stuff done right - using freedns.afraid.org.

I recently installed inadyn to update my IP address on that host automatically...

Happy securing :)

Here's an alternative to freedns.afraid.org :

http://www.instructables.com/id/Host-your-website-on-Raspberry-pi/step5/have-your-domain-name/

Wednesday, September 17, 2014

WPA Mode Not Immune Either

With WEP, I was losing my WLAN link every few hours. WPA is only an upgrade to a "few days". I had to reboot my Pi today just to be able to get back in from my PC through Putty..

Tuesday, September 2, 2014

The Trouble with Mr. Motion

I thought this one was a dream come true..

http://www.projects.privateeyepi.com/home/webcam-surveillance-project/webcam-surveillance-monitor

I guess not, unless one's a PhD in computer science. How the hell is one supposed to fix stuff when it doesn't behave as expected? Yuck!

...

A thousand apologies! It works!! And the picture quality in the movie isn't bad!! I could recognize myself on this crappy camera! Just use winSCP to port the swf file over to windows and look at it with Chrome!! Phew! Now, where can we go with this?

I did update the _port to 8081 (original) instead of 8085, but that shouldn't be necessary..

I thought I should give it some credit and half-heartedly went in the living room and turned on the light and thought that should qualify as motion - since the successive frames differ considerably and - yes! There's a tiny .swf file there and that's exactly what it shows! Looks like christmas light lighting up the room - a 0.5 second movie - on/off/on/off..

Excellent work by Kenneth Lavrsen.