Raspberry Pi: Everything You Need To Know

Written by Zaptoid on . Posted in Arb, Technologhy

Raspberry Pi is a computer the size of a credit card that’s so simple, anyone can program it. Designed as an introduction to science, technology, engineering, and math for UK grade schoolers, its $35 price tag has made it appealing to hobbyists all over the world.

Despite its diminutive device, Raspberry Pi is powerful enough to process many of the same programs as PCs, from word processors to games. Its small size also makes Raspberry Pi ideal for programming connected home devices—like the aforementioned print server, which has given us the power to make every computer, laptop, and cell phone in our network printer-compatible.

The Story Of Raspberry Pi

Eben Upton first came up with the idea for Raspberry Pi in 2006, when he and his colleagues at the University of Cambridge’s Computer Laboratory were frustrated by the dwindling number of students, and the poor skill levels of those students, entering the program.

While current students entering the program often had Web design experience, programming experience was becoming very rare. Upton’s concern? That the price and sophistication of modern computers had made them overly complicated for kids to experiment with.

In the ’70s and ’80s, kids could use an Amiga or Commodore 64 to boot into a programming environment. In later decades, Upton speculated, parents had more reason to forbid the same kind of experimentation on increasingly advanced family PCs. Plus, as computers became easier to use, programming them became more complicated, and tinkering with their inner workings became far less necessary.

Upton wanted to create a cheap, easily programmable computer that would bring back the experimental spirit of an earlier era of computing, by making a device cheap enough so anyone could tamper with it without fear of expensive mistakes. From 2006 to 2008, the official history goes, Upton and his colleagues worked on the prototype that would eventually become the Raspberry Pi. The Raspberry Pi Foundation was established in May 2009, and the first shipment of Raspberry Pis became available in April 2012.

HowTo: Static HOSTNAME For Your Pi On The Internet(dyndns)

Written by Zaptoid on . Posted in HowTo, Unix/Linux

Once again, if your ISP already gives you a static IP address, you don’t need to worry about this section.

We’ve already set up a static internal IP address for the Raspberry Pi, which means computers inside your local network will always know where to find your Pi. But what about projects that require Raspberry Pi to be connected to the Internet? If you want to build a Web server with your Raspberry Pi, people outside your network need to know where your Pi lives, which means setting a public IP that always looks the same.

I say “looks the same” because we’re really setting up a pseudo-static IP. Your ISP will continue to change the address as usual. So every time somebody connects to your Pi, the script we’re about to write will say, “Looks like the Pi has moved! Let me redirect you to the new address.”

We do this with a Dynamic DNS (DDNS), which maintains a name server that gets updated in real-time, and DDClient, a program that will correspond with DDNS directly from your Pi.

First sign up for a free dynamic host service like DNS Dynamic. Follow the instructions and create a new nameserver like Yourserver.dnsdynamic.com.

Now go to the command line on your Raspberry Pi and install DDClient with the following line:

sudo apt-get install ddclient

We need to edit the DDClient configuration with our DDNS’s new name server:

sudo nano /etc/ddclient/ddclient.conf

Every service will have slightly different configuration, but the DDNS website should tell you what you need to do to configure this file. A standard configuration for DNS Dynamic, for example, goes like this. Copy and paste it in.

Building A Raspberry Pi VPN HowTo: Creating An Encrypted Client Side

Written by Zaptoid on . Posted in HowTo

By now, it’s pretty apparent that turning your Raspberry Pi into a Virtual Private Network is an all-evening activity. But as security flaws further compromise our Internet lives, it feels increasingly worth it to have a secure server on your side. That way, you’re free to write emails and transfer data without worrying about what or whom might be intercepting it as it travels from your computer to the Web.

If you’ve followed the steps from other Raspberry Pi VPN HowTo, you’ve got a fully functional VPN server on your Raspberry Pi. You can use this to connect securely to your home network wherever there’s an unencrypted wireless connection. You can also access shared files and media you keep stored on your home network.

Only, you can’t access those files just yet. We’ve created keys for clients (computers and devices) to use, but we haven’t told the clients where to find the server, how to connect, or which key to use.

If you remember, we created several different client keys for each of the devices we want to grant VPN access. We called them Client1, Client2 and Client3.

It’d be a lot of trouble to generate a new configuration file for each client from scratch, which is why we’ll use an ingenious script written by Eric Jodoin of the SANS institute. Instead of generating a file for each client on our own, this script will do it for us.

Following The Script

The script will access our default settings to generate files for each client. The first thing we need to do, then, is create a blank text file in which those default settings can be read.

nano /etc/openvpn/easy-rsa/keys/Default.txt

Fill in the blank text file with the following:

client
dev tun
proto udp
remote <YOUR PUBLIC IP ADDRESS HERE> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20

It should look like the screenshot below, except it should show your public IP address. You’ll see that I deleted my own public IP address because that’s private information you shouldn’t be sharing around. On the other hand, local static IP addresses are very similar for everyone. They usually start with “192.168.”
Now, if you don’t have a static public IP address, you need to use a dynamic domain name system (DDNS) service to give yourself a domain name to put in place of the IP address. I recommend using the free service DNS Dynamic, which lets you pick a name of your choice. Then on your Pi, you need to run DDclient to update your DDNS registry automatically. I wrote a full tutorial for how to do this here.

Chmod permissions (flags) explained: 600, 0600, 700, 777, 100 etc..

Written by Zaptoid on . Posted in HowTo, Unix/Linux

Want to know what the numbers in chmod mean? Using flags is an easy and short form to set user permissions. This article(I hope) puts it SIMPLE, if you want to learn the theory, also visit the links in the end.

There are four OCTAL (0..7) digits, which control the file permissions. But often, only three are used. If you use 600 it equals 0600. The missing digit is appended at the beginning of the number.

Each of three digits described permissions. Position in the number defines to which group permissions do apply!

Permissions:
1 – can execute
2 – can write
4 – can read

The octal number is the sum of those free permissions, i.e.
3 (1+2) – can execute and write
6 (2+4) – can write and read

Position of the digit in value:
1 – what owner can
2 – what users in the file group(class) can
3 – what users not in the file group(class) can

Examples:
chmod 600 file – owner can read and write
chmod 700 file – owner can read, write and execute
chmod 666 file – all can read and write
chmod 777 file – all can read, write and execute

Links:
1) Wikipedia explains that in greater detail: http://en.wikipedia.org/wiki/Filesystem_permissions
2) Main page for chmod: http://linux.die.net/man/1/chmod

Building A Raspberry Pi VPN: HowTo Build A Server

Written by Zaptoid on . Posted in HowTo

Free, unencrypted wireless is everywhere, but you shouldn’t be checking your bank account on it unless you don’t mind somebody else snooping. The solution? A virtual private network, or VPN.

A VPN extends your own private network into public places, so even if you’re using Starbucks’ Wi-Fi connection, your Internet browsing stays encrypted and secure.

There are plenty of ways to set up a VPN, both with free and paid services, but each solution has its own pros and cons, determined by the way the VPN provider operates and charges and the kinds of VPN options it provides.

The easiest and cheapest solution to keep your data safe is to just abstain from public Wi-Fi completely. But that sounds a little extreme to me when it’s relatively simple and inexpensive to build your own VPN server at home, and run it off of a tiny, inexpensive ($35) Raspberry Pi.

My Raspberry Pi is about the size of a smartphone, but it runs a fully functional VPN server. That means no matter where I am, I can connect my computer to my home network and access shared files and media over a secure connection. It came in handy on a recent trip to Boston, where I was still able to watch videos stored on my network back home in DC.

This is the part where I’d link you to a handy tutorial on how to set this up. The problem is one doesn’t exist—or at least one that could satisfy this average computer user. And while there are plenty of tutorials about how to set up a VPN server on Raspberry Pi, there are very few that explain why.

I read several different tutorials and cobbled together the results into this semi-coherent tutorial for setting up a VPN on Raspberry Pi, which even I can understand, complete with the why behind the how. Most prominently, I relied on Eric Jodoin’s VPN tutorial for experts, and dumbed it down for me.

So follow me down the cryptography rabbit hole and learn that no matter how paranoid you are, whoever came up with the methods to generate VPNs was even more so.

 

Materials

Hardware

Raspberry_Pi_Model_B_Rev._2
Raspberry Pi Model B: Plus everything that comes with it—by that, I mean a regular power source and a case to put it in. A case can help prevent accidental short-circuits that could permanently damage the machine—the case can even be as simple as a cardboard box you fold yourself.

SD card: I’m suggesting 8GB or more, just to make sure you have the space. As always for all Raspberry Pi projects, this should already have NOOBS installed.

Cat5e cable: This will connect the Pi’s ethernet port to the ethernet port on the router.

Software

Open VPN: This is the open source VPN service we’ll be installing today.

Recent Comments

Katherine Bellingshausen

|

I simply couldn’t leave your web site prior to suggesting that I extremely loved the standard information a person supplies to your guests

Johanna Arnett

|

Very quickly this web page will be famous among all blog people, due to it’s good posts.

NP

|

It’s works Thank you so much

optymalizacja i pozycjonowanie

|

Way cool! Some extremely valid points! I appreciate you penning this write-up and also the rest of the site is also
very good.

strony internetowe krakow

|

I love your blog.. very nice colors & theme.
Did you create this website yourself or did you hire someone to do it for you?
Plz respond as I’m looking to create my own blog
and would like to find out where u got this
from. thanks a lot