In this post, I would like to share my raspberry experiment. I don't want to write another post of "How to do <this> with raspberry pi", but instead, share my experience. First of all:
What is Raspberry Pi?
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.
Raspberry Pi and I
I totally agree with the FAQ's definition! And I would recommend to all parents who are PC "aware" to buy a RP for their children!
My history with RP was quite long! I had been thinking of buying a RP a long time ago. But, I have a drawback (apart from my noumerous advantages of my character! :P); if I want something badly, I want it at the same time! Therefore, I wanted to buy a RP and didn't want to wait about 3 weeks, so I ordered from ebay. Unfortunately, I had bad luck. I ordered Friday and Saturday (as far as I can remember), it was announced that RP new releases would come with 512MB RAM instead of 256MB. All customers who had order from the authorized resellers they would get the 512MB version without any extra cost. But I had ordered from ebay!... So, no luck!... Nevertheless, I didn't get disappointed.
My "Project Plan"
My experiment with RP was to create a RP to host the following:
- VPN server
- Torrent downloader
- TOR proxy
- Syslog
- Dropbox uploader
- File Server
- (I hope the list will grow!)
Getting Started
I will skip the first steps because they are well documented at RP's site
here!
Initially I had an SD with 8GB RAM but unfortunatelly it was declared
dead.... So, I bought a 16GB SD, class 10! :)
First steps
I will start from the classics. Change the default password and throught raspi-config, extend file system to occupy the whole SD card and enable SSH. You will need it some time!
One of the classic security basics is to change your password! Through raspi-config, change the timezone and the keyboard. Another way to do this is to edit XKBLAYOUT and set it to "us" at /etc/default/keyboard.
Update your RP
In order to keep my RP distro up to date I used RPi update. You can get it by doing the following:
> sudo apt-get install git-core
> https://github.com/Hexxeh/rpi-update
Copy it to a cron directory, according to your needs (I have copied to the cron.weekly for example).
VPN Server
I have set up a VPN server in order to get connected to website & services over unsecured WIFIs. I have used
this useful guide to set it up!
Torrent Box
I use bittornado client. Generally, you can use apt-get command and install your preferable torrent client software.
Here you can find a guide for installing trasmission on your RP!
TOR Proxy
TOR project is an open network which you can use in order to tunnel your requests through many proxies all over the Internet. The purpose of the project is to provide its user anonymity.
Here you can find information regarding TOR project.
The installation on my RP was quite simple. Issue the command:
apt-get install tor
and your RP is hosting your TOR proxy. Now you must alter your proxy settings on your browser in order to route all your requests through the TOR software. A very nice firefox add-on is
QuickProxy!
Syslog
I also use syslog service of my RP to gather all logs from my network devices. You have to un-comment the following lines from /etc/rsyslog.conf:
$ModLoad imudp
$UDPServerRun 514
and instruct the network devices to use your RP as a syslog server!
Dropbox uploader
One of my first thoughts with RP was to upload files to dropbox through RP in order to take advantage of RP's low consumption. Moreover, it won't be necessary to have my macbook powered on in order to upload large files!
I found a useful script which uploads files to Dropbox with a Bash script. It's very useful and easy to install and use! You can find it
here.
File Server
My RP is always ON! So why not share some files? For example some photos? So, I created a user, installed samba and voilá; my photos are shared on my home network. I used the following sequence:
#Install samba
> apt-get install samba samba-common-bin
#Created a user
> adduser <username>
#Set user samba password
smbpasswd -a <username>
#Added the following lines in /etc/samba/smb.conf:
[Photos]
comment = Photos Folder
path = <path here>
writable = no
guest ok = no
#Restart Samba Service
> /etc/init.d/samba restart
Now, the path entered in Samba.conf file is being shared over the network!
Iptables
Last but not least, you need to setup a firewall. Iptables is a fine solution. If your RP is exposed to the Internet, it would be wiser if you configure your iptables. Here is some of fine guided I have used to write my iptables:
http://www.cyberciti.biz/tips/linux-iptables-examples.html
http://www.garron.me/linux/iptables-manual.html
http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
Sum-up
My adventure with the RP does not end here. I experiment a lot with my RP and currently I am working on the project
Kali Linux on RP, so stay tuned!
Further Reading