Validating a downloaded program

# import company key into your system
# sometimes called signing key or public key
# the file of import should start with this line ‘—–BEGIN PGP PUBLIC KEY BLOCK—–‘
$ gpg --keyid-format long --import [public_key/signing_key]

# run validation with signature and program.
$ gpg --keyid-format 0xlong --verify program.exe.sig program.exe

# you may get several different responses but the one that is bad for sure is ‘gpg: BAD signature from …’

good example and instructions
https://tails.boum.org/doc/get/verify/index.en.html
click on ‘Using Linux with the command line’

# view imported keys from gpg imports
$ gpg --list-keys
# view imported keys from ppa imports
$ sudo apt-key list

# remove keys
$ gpg --delete-keys "name"
$ gpg --delete-keys "Tails developers"

# site to hold manage keys
https://keybase.io/

# additional information
http://www.thegeekstuff.com/2013/02/gpg-encrypt-decrypt/
https://www.digitalocean.com/community/tutorials/how-to-use-gpg-to-encrypt-and-sign-messages-on-an-ubuntu-12-04-vps

Configuring ddclient

ddclient updates IP addresses at dynamic DNS services.

# install ddclient
$ sudo apt-get install ddclient

Configuring dyndns.com

Selected dyndns.com in the installation process and followed the prompts. Did not need to manually enter anything.

Configuring namecheap.com

Enable Dynamic DNS for your domain
Login to your Namecheap control panel and enable dynamic DNS for your domain.
You’ll get a really long password string to use. Save that for now as you’ll need it later on.
namecheap dynamic dns password

$ sudo nano /etc/ddclient.conf

# namecheap.com example configuration
# the login is the domain name and password is the hash you saved in the prior step called ‘Dynamic DNS Password’.

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

protocol=namecheap
use=web, web=dynamicdns.park-your-domain.com/getip, web-skip='IP Address'
server=dynamicdns.park-your-domain.com
login=baligena.com
password='36e39d6fief87be5e38c7d7507863'
@,www

# remove cache
$ sudo rm /var/cache/ddclient/ddclient.cache

# force update, you may need to delete cache
$ sudo ddclient --daemon=0 --debug --verbose --noquiet

# another configuration file
$ sudo nano /etc/default/ddclient
# to enable automatic updates you must enable the daemon, see specified settings

run_dhclient="false"
run_ipup="false"
run_daemon="true"
daemon_interval="300"

# restart ddclient
$ sudo /etc/init.d/ddclient restart

source:

tags:
ddns, Dynamic DNS

Setup linux Motion Camera Raspberry pi

After you have a working raspberry pi with internet working. I used a raspberry pi 2.

Setup:
$ sudo apt-get update
$ sudo apt-get install motion

$ sudo nano /etc/motion/motion.conf
daemon on
logfile /tmp/motion.log
stream_localhost off
stream_auth_method 2
stream_authentication username:password
webcontrol_localhost off
webcontrol_authentication username:password

$ sudo nano /etc/default/motion
start_motion_daemon=yes

$ chmod -R 777 /var/lib/motion
$ chown -R pi:pi /var/lib/motion

# start motion
$ sudo service motion start
or
$ sudo /etc/init.d/motion start

You can now open up a browser from another computer on the same network and go to: http://192.168.0.85:8081 to view your web cam.
You can remotely control the web cam settings by going to http://192.168.0.85:8080.

trouble shooting:
# View if ports are listening
$ netstat -tapen | grep “LISTEN”
$ sudo nmap -sS 192.168.0.85

# test connection
telnet 127.0.0.1 8080

# view if there is any errors. Make sure log is enabled in motion.conf
# At one point the ports were not staying open after motion started was due to permission issues on /var/lib/motion. Error was found in the log.
$ cat /tmp/motion.log

# view if motion is running
$ ps aux | grep motion

# other commands
$ motion start

resources:
http://www.instructables.com/id/Raspberry-Pi-Completely-Wireless-IP-Camera-Solar/
http://www.instructables.com/id/Raspberry-Pi-as-low-cost-HD-surveillance-camera/?ALLSTEPS

multiple cameras:
http://ubuntuforums.org/showthread.php?t=1897786