Browse Tag: tutorial

How to Build a Raspberry Pi Security Surveillance Camera with MotionEye

Turning your Raspberry Pi into a security surveillance camera is a cheap alternative to setting up a security system in your house or office. The Raspberry Pi 3 is more then powerful to capture video with the Official Raspberry Pi camera. Today we will be installing MotionEye on our Raspberry Pi to turn it into a security camera. We will be able to view live video in our browser as well as auto record videos when motion is detected. This is great for saving precious space on our microSD card and only keeping the videos we need. We can also save the videos and delete them after a set amount of time. Setting up a Raspberry Pi security camera with MotionEye is very easy and works right out of the box with the default settings.

We will also be able to setup a network of security cameras with multiple Raspberry Pi’s and monitor all of camera over one interface. If cost and space is an issue it is possible to upload all our videos to your Dropbox or Google Drive account for easy access anywhere. This is a great low cost solution to building a security system in your house and you can also use it as an outdoor system as well to monitor your front door. There are a ton of Raspberry Pi compatible cameras you can use for the Raspberry Pi security camera and the choice is your’s depending on your needs. You can use the official Raspberry Pi camera that plugs into the camera port or you can use an old webcam that you have laying around and plug it into the USB port.

Objective

To build a Raspberry Pi security surveillance camera system that is run and controlled over your own network

Material

You will need the following:

Instructions

Let’s get started. We will first need to install our camera onto the Raspberry Pi by plugging it into the camera port. I am using the official NOIR Raspberry Pi camera in this tutorial, however you can use whatever camera is compatible with the Raspberry Pi. Plug your camera’s ribbon cable into the camera ribbon slot on the Raspberry Pi board, the camera ribbon port is the one located behind the Ethernet port. You your fingers to pull up on both sides of the connector to open it up and insert the ribbon cable with the metal leads facing away from the Ethernet port. Once the ribbon cable is seated all the way inside the connector you can push down on the connector to lock the camera’s ribbon cable in place. It is important that the metal leads face away from the Ethernet port or your camera may not work or even worse it can be shorted. Continue Reading

How to change your SSH Port on the Raspberry Pi

About: The latest version of Raspbian disables SSH by default to improve security of the Raspberry Pi. This is a great step of improving internet and network security and I congratulate the Raspberry Pi team for moving forward with this step and making it super easy to enable SSH by simply adding a file called “ssh” into the /boot/ directory.

Enabling SSH allows you to use your Raspberry Pi headless, meaning you can use it without a keyboard and monitor by connecting to it from another computer. The problem still persists that if you have SSH enabled on port 22 hackers can still scan your network looking for an open port 22. They can then attempt to enter your network from the Raspberry Pi and attempt to brute force your username and password.

Changing your SSH port will increase your security assuming a hacker scans your network for default ports only. You will still need to have a secure password and think of using SSH keys to improve security even further. Changing your port number will simply decrease the amount of probe attempts on your port. A non-standard port means that you don’t automatically show up in Shodan or other places that list machines listening on port 22.

Objective: To change our default SSH port number from 22 to another random port number to increase security

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $37 with free shipping)

Instructions: Let’s start off by opening the terminal on your Raspberry Pi or by connecting to it over SSH

Continue Reading

How to schedule Cron Jobs on the Raspberry Pi

About: I have recently been working on a MMORPG turn based text game and needed a way to run a php script every 2 hours to generate a turn. Since I use the Raspberry Pi as a LAMP server for testing out my game before releasing official updates I figured it would work well as a cron job to call a website page every 2 hours.

You can schedule many types of cron jobs using your Raspberry Pi. Cron is basically the Linux version of the Windows Task Scheduler. You can schedule commands to run at certain times of the day or only run once a month. The shortest time a cron job can run is 1 minute in between commands. If you need a command to repeat every 30 seconds then a cron job will not work.

Objective: To create and schedule a cron job using the terminal on the Raspberry Pi

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)

Instructions: Open up a terminal window and type the following command to create a cron job

Continue Reading

How to change your Raspberry Pi Hostname

About: There may come a time where you will want to change your hostname on the Raspberry Pi. For example the default hostname when using Raspbian is ‘raspberrypi’. This is fine, however if you have 2 Raspberry Pi’s running on your network you will want to change the hostname to differentiate the Raspberry Pi’s on your network. This isn’t critical since they still will have different IP addresses but it will help you if you look at your network list on your router or when running certain commands that include the hostname.

I will show you two different ways to change your Raspberry Pi’s hostname. The first way is using SSH/Terminal which would be useful if you are running your Raspberry Pi headless and can connect to it using SSH. The second way is using the Raspbian desktop and is just a few clicks.

Objective: To demonstrate how to change the hostname on your Raspberry Pi

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $37 with free shipping)

Instructions: Let’s start off by showing you how to change the hostname using the terminal or using SSH Continue Reading

How to setup your Raspberry Pi as an Access Point

About: Setting up your Raspberry Pi as an access point may come in handy. Especially in a pinch when your home router dies and you need some WiFi in your house while a new router is on order. It can also be useful if you want to set up an access point to perform evil doings like monitoring all the traffic or setting up an evil twin network.

In this tutorial we will be setting up a WiFi Access Point and linking all data to our Ethernet connection, so make sure we have an active internet connection on the Ethernet port to tunnel all the WiFi data to it.

Objective: To create a WiFi access point on our Raspberry Pi and link our WiFi connection to the Ethernet connection.

Material: You will need the following:

Instructions: Just a warning before continuing, setting up your network settings can mess things up if you are using the Raspberry Pi for something else. Be sure to make a backup of your Raspberry Pi before continuing if you need to. Also troubleshooting network issues can be difficult if you are inexperienced with networking. Be sure to follow the directions carefully and you should be alright.

Continue Reading

How to disable WPS on the Netgear JNR3210 Router

About: WPS stands for Wi-Fi Protected Setup and it is a wireless networking standard that tries to make connections between a router and wireless devices faster and easier. It works only for wireless networks that have WPA/WPA2 security. That’s great, however there is a problem with WPS, it can easily be cracked and allow a hacker access to your home WiFi network.

WPA2 security is very secure and there really is no way of hacking WPA2 without using a dictonary attack which can take months depending on the hardware you are using to bruteforce. It can also be a waste of time if your password is very long and includes many special characters, however if you have WPS enabled on your router (which it usually is by default) there is a faster way to hack your WiFi and it can be usually done in a maximum of 12 hours.

Objective: To disable WPS on our Netgear JNR3210 router to improve WiFi security.

Material: You will need the following:

Instructions: You will need to begin by opening your browser and typing in the IP address for your router. The default is usually http://192.168.1.1 on Netgear routers. Type in the username and password. The default username is ‘admin’ and the default password is ‘password’.

Netgear3210_1
Login to your Netgear JNR3210 router

Continue Reading