Tags

, ,

This guide will walk you through a series of steps to configure really basic security for your Raspberry Pi.  First create a new user and remove the default pi account. 

Create a new user account

sudo useradd -m newuser -G sudo
sudo passwd newuser

Then ensure that the new newuser account uses bash. Simply add bin/bash to the newuser account if needed.

sudo vi /etc/passwd

Logout and login as newuser. Make sure everything works for the newuser and then remove pi account.

sudo deluser -remove-home pi

Install Firewall

Install the open source firewall and enable two ports. I like to enable secure shell access (ssh) and file access from my Mac laptop Apple Filing Protocol (AFP) over TCP.

sudo apt-get -y install ufw
sudo ufw allow 22
sudo ufw allow 548
sudo ufw enable
sudo ufw status

I do this for all of my Raspberry Pi servers. I’m sure more could be done but that’s for later post.