Tuesday, December 8, 2015

Introduction to IPTABLES Tutorial

My notes on iptables commands.

Firewall tutorial for iptables
Contents:

  1. View
  2. Append rules
  3. Insert a rule
  4. Delete a rule
  5. Default Policy
  6. Saving the rules

The problem with devices and applications not being able to access the server is usually due to configuration of the iptables firewall. This can be configured on an application or through command line terminal.


Monday, December 7, 2015

Raspberry Jam Kuala Lumpur 2015 - Kids at the Workshop

The Raspberry Jam Kuala Lumpur 2015 saw quite a huge turnout. This first Jam for Malaysia was on 5 Dec 2015 at Asia Pacific University (APU), Kuala Lumpur.

There were concurrent (parallel) sessions of free talks and hands-on workshop. Since the workshop was hands-on, participants who purchase/register for the workshop online included the price of hardware. This consist of;

Raspberry Pi 2 model B
Power adapter
Raspberry case (red & white)
Micro SD card (8GB)

There were ample parking along the road side as the huge parking lot was full. Probably due to a fun run being held at the same venue. A goody pack was given out during registration. At the first talk, the presenter from APU introduced a work in progress of a robot that uses raspberry pi (RP) and adruino.
Tele-presence and Tour Guide Robot using RP by APU
Its off to the workshop after that talk. The workshop title was "Getting your Raspberry Pi up and running and setting up for File sharing" and was conducted by Raspberry Pi Penang.

The number of participants was double the online registrations, as they allow walk-in registrations. There was another kid at the front row but Martha was nervous, not in a mood to talk to anyone. A quick check of our hardware and its found that the micro SD card doesn't come with an adapter. The laptops and PCs only had the standard SD card readers. Thanks to Fazli (I don't think he recognise me) for sharing his SD adapter.

Setting up the RP
Done fixing RP and casing


Following the instructions, she completed the installation of Raspbian (from MS Windows), updating and upgrading the Raspbian Jessie. Installed and configured Samba for file sharing. Didn't get a chance to test the file sharing as the instructor took more time than the allocated 1 hour session.



Martha updating Raspbian

While she was waiting for the others to complete the steps, Martha found Minecraft in the installed Rasbian. Tried to find the keys and explored Minecraft world. Its the first time for her to setup and she had an enjoyable learning experience.

Generally steps to create a file sharing server with the RP during the workshop;

Step 1: Install Raspbian

Download latest Rasbian image, currently its Jessie from www.raspberrypi.org and create the image on the SD card. Insert the blank SD card into the computer used to write the image. For MS Windows users, the software is called Win32DiskImager-0.9.5-binary and for Linux, the software is pre-installed called "dd".

Step 2: Update and Upgrade Raspbian

Take the SD card and install in the RP (make sure power is off). Plug-in all the cables (Monitor, keyboard, mouse, network) and turn on RP power. Watch the monitor screen as it boots.

Configure the settings from the "preferences" menu and reboot.

Open the terminal and type;
sudo apt-get update
sudo apt-get upgrade -y

Reboot.

Additionally I would suggest;
1. Change the default pi user password
2. Add additional tools, at the terminal type;
sudo apt-get install raspberrypi-ui-mods

Step 3: Install Samba

At the terminal type:

sudo apt-get install samba samba-common-bin

Assign access of the default pi user for file sharing. When prompted for password, enter the pi user password.

sudo smbpasswd -a pi

Restart samba

sudo /etc/init.d/samba restart

Done.

From a computer in the same network, use the network share tools to access the RP via IP address. You will need to enter the pi user password.

Example:

On a MS Windows, open the Windows Explorer and click on the network. type in the hostname of the Raspberry Pi. Select the option to Connect as a different credentials, since the Windows is likely to be logged in with a user other than the name "pi".


On MS Windows 8.1, the samba share needs to be map manually. Open a command prompt and type the following;

net use windowsdir shareserver\sharepath /USER:username thepassword

Example
net use Z:  \\10.1.1.103\pihome /USER:pi thepassword

Blog Archive