Book Image

Internet of Things with Raspberry Pi 3

By : Maneesh Rao
Book Image

Internet of Things with Raspberry Pi 3

By: Maneesh Rao

Overview of this book

This book is designed to introduce you to IoT and Raspberry Pi 3. It will help you create interesting projects, such as setting up a weather station and measuring temperature and humidity using sensors; it will also show you how to send sensor data to cloud for visualization in real-time. Then we shift our focus to leveraging IoT for accomplishing complex tasks, such as facial recognition using the Raspberry Pi camera module, AWS Rekognition, and the AWS S3 service. Furthermore, you will master security aspects by building a security surveillance system to protect your premises from intruders using Raspberry Pi, a camera, motion sensors, and AWS Cloud. We'll also create a real-world project by building a Wi-Fi – controlled robot car with Raspberry Pi using a motor driver circuit, DC motor, and a web application. This book is a must-have as it provides a practical overview of IoT’s existing architectures, communication protocols, and security threats at the software and hardware levels—security being the most important aspect of IoT.
Table of Contents (11 chapters)

Setting up a firewall

There are many firewall solutions available for Linux/Unix-based operating systems, such as Raspbian OS in the case of Raspberry Pi. These firewall solutions have IP tables underneath to filter packets coming from different sources and allow only the legitimate ones to enter the system. IP tables are installed in Raspberry Pi by default, but are not set up. It is a bit tedious to set up the default IP table. So, we will use an alternate tool, Uncomplicated Fire Wall (UFW), which is extremely easy to set up and use ufw.

To install ufw, run the following command (refer to Figure 10.17):

sudo apt install ufw
Figure 10.17

Once the download is complete, enable ufw (refer to Figure 10.18) with the following command:

sudo ufw enable
Figure 10.18

If you want to disable the firewall (refer to Figure 10.20), use the following command:

sudo ufw disable
Figure 10...