Hello Tony,
Security on Linux is a very deep topic and you can find a LOT about it
by searching on things like:
"How to Harden Debian Linux"
The first hit is the "Securing Debian HOWTO" which is an excellent start:
https://www.debian.org/doc/manuals/securing-debian-howto/
Since you mentioned a Rpi, I've started a short document on both making
an Rpi more hardened but also more reliable too (minimize microSD card
writes, etc) too:
http://www.trinityos.com/HAM/CentosDigitalModes/RPi/rpi2-setup.txt
It's still very much a work in progress but might help you get started.
Feel free to ask me questions offline as I've been doing this for a
while with other documents like the IP Masquerade HOWTO, the TrinityOS
documentation set, etc.
--David
KI6ZHD