CEIS 100 Week 5 Lab Assignment Help | Devry University
- Devry University / CEIS 100
- 09 Apr 2019
- Price: $22
- Other / Other
CEIS 100 Week 5 Lab Assignment Help | Devry University
Week 5 Lab
Computer
Security on the Raspberry Pi
A complete set of instructions can
be found under this week's Lab section.
Laboratory
Procedures
DeVry University
College of Engineering and Information Sciences
I.
OBJECTIVES
1.
Securing
your pi
II. ASSUMPTIONS
In this lab you will add some security
essentials to your raspberry pi.
III. PROCEDURE
Part a.
1. By default the raspberry pi does not
provide access to many ports. We will check to be sure by running a port scan.
A Port scan will determine which ports are open. The nmap tool is useful to run
a port scan on your own computer. It is a free download. We will use a tool
that is already installed on the pi called netcat. The netcat command with a –z
flag will show the open ports. We just need to know the host name of our
computer first.
Turn
on the raspberry pi, login with: pi and password: raspberry. Type startx to start your pi. Then open a
terminal window.
2. Type in hostname at the prompt. What is the hostname for your pi? _______________
3. Note: This may not work on some raspberry
pi computers. Run port scan for ports 1-100 for your host name by typing in:
sudonc –zvyourhostnamehere
1-100
(note: replace your hostnamehere with the hostname you discovered in step 2)
Take a screenshot and paste below (take a screenshot or a picture with your phone).
1. What port(s) were open?
_____________________________
2. Why do you think that port or ports are
open (hint: research what the ports are used for)
1. Another important security risk is the
default username and password. Keeping the login pi with the password of
raspberry can add some security risk.
2. Change default password. Type passwd
3. You will be asked to type in the old password and enter a new password twice. When you input a new password no text is displayed on the screen. IMPORTANT: Remember your new password!
4. Rather than using the default login of pi,
adding another user is a good idea. Instead of using the default user as pi,
add a new user. This user can have sudo (root privileges) or you can just
create a user without root privileges. In order to create a new user we must
use the "sudo" command which gives us root privileges to create a new
user.
5. Create a new user with the following
command: sudouseradd –m devryuser
6. Then type in sudopasswddevryuser to give the new user a password
7.
Take a screenshot of the command to create
a new userand paste below (or a picture with your phone):
8. A firewall blocks unauthorized access to
your network. We will add a firewall to the raspberry pi to secure it. The
first step is to update your pi. At the command prompt type:
sudo apt-get update
This
will update your system.
9. Next we will install firewall builder. To
install it, type in sudo apt-get install
fwbuilder
10. If you are asked a yes/no question about
additional space requirements, choose Y. Once it has finished installing, you
will receive a prompt.
11. To open firewall builder, go to
Menu->Internet->Firewall Builder
12. The Create New firewall allows you to add a
firewall. In menu create a name for the firewall, we will add a basic firewall
but later you can choose the type of firewall you would like for your pi. In
the wizard give your firewall a name, choose software the firewall is based on
(iptables), the OS type the firewall runs on linux 2.4/2.6.
1. Check use preconfigured firewall templates.
Firewall builder allows you to create a firewall for a network. In our case we
will create a single interface template. Read through the different templates. Host
fw template 1. This firewall is a basic firewall for a desktop machine. Click
Next and finish. You now have a firewall for your pi!
Take a screenshot or picture with your
phone and paste below:
Next part is for
your information only and not part of the lab
Part b. Share
folders with a windows computer from your raspberry pi (need a home network)
2. Sharing files with your raspberry pi is
really helpful. You can set up a share with your home computer to your
raspberry pi by installing samba. Samba provides support for Windows naming
service.
3. To install samba, first update your pi by
running this command: sudo apt-get
update
4.
After
updating, install samba with the following command: sudo apt-get install samba samba-common-bin
5. Now we need to set up a folder to share. We
will create a folder called share using this command: mkdir ~/share
6. Open your home computer and determine the
workgroup you are using. Go to Control Panel, Performance and Maintenance, then
click System (or click Settings -> System->About). You should find the
name of your workgroup. The default is WORKGROUP. What is your workgroup?
_________________________________
7. We will need to add a few things to the
configuration file for samba. Type in the following to edit the configuration
file: sudonano /etc/samba/smb.conf
8. Make sure the following parameters are set:
workgroup=WORKGROUP (or whatever your workgroup name is) and wins support = yes
9. At the very bottom of the file add the
following code:
[PiShare]
comment=Raspberry Pi Share
path=/home/pi/share
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
22. Press ctrl+x and choose Y to save and exit.
23. You can add devryuser as the network user.
To do this type in the following command: sudosmbpasswd
–a devryuser
24. And enter devryuser's password twice.
25. Now you can login from your home computer. Open Windows Explorer and type in \\RASPBERRYPI
This should open a dialog box asking you to enter a network password. Enter the password for devryuser.
26. Once you enter the password, the raspberry pi should show up on your file explorer and you should be able to transfer files to and from the pi.