• Maker Space
  • My Blog

Part Time Maker

~ DIY – Home Automation System

Part Time Maker

Tag Archives: guide

Securing Raspberry Pi

28 Friday Feb 2020

Posted by parttimehacker in How to guides

≈ Leave a comment

Tags

guide, raspberry pi, security

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.

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • April 2020
  • February 2020
  • December 2019
  • March 2018
  • November 2017
  • August 2016
  • June 2016
  • February 2016
  • December 2015
  • October 2015
  • September 2015

Categories

  • How to guides
  • Projects
  • Uncategorized

Meta

  • Register
  • Log in

Blog at WordPress.com.