5 Tips to Secure Your Raspberry Pi
by TheWeekendMaker in Circuits > Raspberry Pi
743 Views, 8 Favorites, 0 Comments
5 Tips to Secure Your Raspberry Pi
When connecting Raspberry Pi to outside world, you need to think about security. Here are 5 tips that you can use to secure your Raspberry Pi. Let's get started.
Video
5 tips to secure your Raspberry Pi in 3 min video. Take a look.
Tip #1. Change Your Password
With standard installation of Raspbian, default username is "pi" and the password is "raspberry". If you haven't at-least changed this password, anyone can log in to your Pi !!.
To change your password go to Menu > Preferences > Raspberry Pi Configuration. In the system tab, click change password, enter one, confirm it and click OK.
Tip #2. Keep Raspbian Up to Date
From time to time, security vulnerabilities are found in software, so its always best to get the latest version on regular basis. Open up terminal, and type.
sudo apt-get update
to update your package lists, following that type
sudo apt-get dist-upgrade
to get the latest version of the packages on your Raspberry Pi.
Tip #3. Install Fail2ban
If someone wants to hack into your Raspberry Pi, they may try to guess your username and password. It will probably take a lot of attempts, but this is called 'brute-forcing'. To prevent this, you can install a program called Fail2ban. Install it using
sudo apt-get install fail2ban<br>
and a user will be banned for ten minutes if they fail login 5 times.
Tip #4. Change Default SSH Port
If you change the default SSH port, anyone trying to connect would need to know which port to use. To alter it open terminal and type,
sudo nano /etc/ssh/sshd_config
and change line #Port 22 to Port 2222 or which ever port number you like. Save and exit. then restart SSH with
sudo service ssh restart
Tip #5. Turn Off Interfaces You Don't Need
The safest way to stop hackers is to not have any network connection, but another way of shutting down system a bit more is to go into main Menu > Preferences > Raspberry Pi Configurations and select the interfaces tab. Make sure everything you don't need is disabled.
Thats It
That's it Folks. Don't forget to check out my other instructables articles.
***This instructable was inspired by Magpi #80.