RefBan

Referral Banners

Wednesday, January 23, 2013

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You Go

January 23rd, 2013Top Story

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You Go

By Melanie Pinola

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You GoThe tiny, inexpensive Raspberry Pi has a very low power consumption, which makes it a great always-on VPN (Virtual Private Network) server. With a VPN, you'll get secure access to your home network when you're on the go and can use it for secure web browsing when you're on public networks. Here's how to roll your own VPN with the Raspberry Pi.

It's Raspberry Pi week at Lifehacker, and all week we'll be showing you some cool DIY projects you can put together with this little miracle of a device. If you haven't bought one yet, check out our introduction to the Pi to learn more about what it is, what you'll need, and the cool stuff you can do with one (such as turning it into an XBMC media center). For a basic introduction to VPNs, check out our guide to why you should start using a VPN (then come back here).

What You'll Need

Setting up your Pi as a VPN and web proxy server doesn't require any new or special hardware beyond the basics. You'll need:

  • A free LogMeIn account since we're using LogMeIn Hamachi to create our VPN. Create your free account, if you don't have one already, before you get started. Hamachi will create a VPN for you, so you don't have to mess with port forwarding on your router, getting a static IP address, or trying to bypass firewalls.
  • Privoxy: We're pairing this application with Hamachi to enable the secure web browsing from either inside or outside the network. You'll download it in Step 5 below.
  • A Raspberry Pi, naturally: See our intro guide for suggestions on where to buy one if you don't already have it.
  • HDMI or composite cable: To connect the Pi to a television or monitor. Once you've completed this project, you can disconnect the Pi from your display and use it as a "headless" server, since you can connect to the Pi over VPN.
  • An 8GB Class 10 SD card or better and a card reader: Your computer may have a built-into SD card reader; if not, you'll need an external one to set up the Pi.
  • USB keyboard and mouse: I used old wired ones lying about the house, but Whitson was able to use wireless (non-Bluetooth) versions.
  • An ethernet cable: For the best network performance, you'll want a wired connection to your router/modem (rather than looking at Wi-Fi solutions for the Pi). Having a broadband internet connection at home will make the proxy server as fast as possible as well.
  • Micro USB power supply: Look for a good quality charger that can provide at least 700mA at 5V. Most modern smartphone chargers will work, but check out the specs on the bottom of the charger brick to make sure. Besides the SD card, the power supply is one of the main troubleshooting elements if you have problems.

We've walked you through the steps of setting up a personal VPN with Hamachi and using it with Privoxy for secure browsing before, but the steps below are updated for Linux and the Pi in particular. We'll be entering some commands in the command line and changing configuration files, but really this project is very easy to do. (Hat tip to the Raspberry Pi community for the tips and troubleshooting used in this article.)

Step One: Hook Up and Configure Your Raspberry Pi

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You GoIf you haven't already, follow the steps in our Beginner's Guide to DIYing with the Raspberry Pi to create the base system running Raspbian, the standard operating system for the Pi.

Note, however, that there's one additional step you should take when following that guide, at the end in the configuration section (before step 3, finishing configuration). Change the default keyboard layout if you're not in the UK. The reason is some of our commands require special characters (e.g., #), which the UK layout changes.

If you're following the setup guide above, you can change the keyboard layout in the configuration screen. Or, after you've set up the Pi, type in:

sudo dpkg-reconfigure keyboard-configuration

Then follow the prompts to switch to your country's layout and then either restart (using the sudo reboot command) or reload the keymap without restarting by entering:

invoke-rc.d keyboard-setup start

Step Two: Update the Raspberry Pi and Install Hamachi

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You GoHamachi depends on a couple of packages that may not be present in your image, so we're going to first update the packages and hopefully save you time troubleshooting common errors.

First, grab the latest update:

sudo apt-get update

Then, install LSB (a requirement for Hamachi):

sudo apt-get install --fix-missing lsb lsb-core

Be patient while it updates, and then you can download the latest Hamachi build for Linux:

sudo wget https://secure.logmein.com/labs/logmein-hamachi_2.1.0.86-1_armel.deb

If you get errors grabbing the Hamachi for Linux download, check the download page on LogMeIn to verify the version number (e.g., 2.1.0.86-1) and change it in the filename if necessary.

Next, install Hamachi by entering:

sudo dpkg -1 logmein-hamachi_2.1.0.86-1_armel.deb

Step Three: Configure Hamachi on the Raspberry Pi

The last step for our VPN setup is to get Hamachi running on the Pi and on our client PCs.

On the Raspberry Pi, run the following to get the Pi connected to your LogMeIn account and create a new Hamachi network:

sudo hamachi login
sudo hamachi attach [INSERT LOGMEIN.COM EMAIL HERE]
sudo hamachi set-nick [INSERT A NICKNAME FOR YOUR RASPBERRY PI]

Now, on another machine, head over to LogMeIn and go to your "My Networks" section under networks. You'll see that the Pi (whatever you nicknamed it) is trying to connect and create a new network. Grant the Pi permissions and write down the network ID (a 9-digit number) for that network.

Go back to the Raspberry Pi and enter:

sudo hamachi do-join [THE NETWORK ID YOU WROTE DOWN]

Then enter your LogMeIn password (if requested). You might need to approve the join request on LogMeIn from the other machine. Once you do so, the Pi will be part of the new VPN served by Hamachi. At LogMeIn.com, look for the virtual IP address assigned to the Pi and write that down, because you'll need it later.

To be able to SSH into it and remotely control the Raspberry Pi, start the SSH server:

sudo /etc/init.d/ssh start

Step Four: Install Hamachi on Your Computers

Almost done! For the Windows, Mac, or Linux computers you also want to connect to the VPN, you'll need to install the Hamachi client from the download page.

After you do so, you can join the new VPN (Network > Join) and SSH into the Raspberry Pi or access network files, etc. (In Windows, use a tool like Putty or in Mac/Linux use Terminal to SSH, using the Raspberry Pi's IP address assigned by Hamachi in the server field).

(Optional) Step Five: Install Privoxy on the Pi and Use It as Your Computer's Web Proxy

Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You GoBesides issuing remote commands to the Pi and accessing network files, you can use your Pi as a proxy server. By connecting Privoxy and Hamachi, you can secure and encrypt your browser sessions when you're using the public Wi-Fi at your local coffeeshop—keeping your data safe from prying eyes or malicious users.

Here are the steps to set up Privoxy on the Pi:

  1. Install Privoxy:

    sudo apt-get install privoxy
  2. Start Privoxy:
    etc/init.d/privoxy start
  3. Open the configuration file in your text editor:
    sudo nano /etc/privoxy/config
  4. Find the following line (easy in Nano if you do a search by hitting Ctrl+W): listen-address localhost:8118
  5. Comment out that line by adding a # before it
  6. Then add a new line below it with: listen-address [IP address of your Pi assigned by Hamachi]:8118 (e.g., 25.1.1.1:8118)
  7. Save the configuration file (Ctrl+X) and restart Privoxy:
    sudo service privoxy restart

Now you have your Privoxy server set up on the Pi, running over the secure VPN via Hamachi. All that's left to do is set Privoxy as your proxy server on your other computers.

To do that:

  • In Google Chrome: Go to Settings > Show advanced settings... > Change proxy settings... (under Network)
  • In Firefox: Go to Preferences > Advanced tab > Network tab > Settings button (next to "Configure how Firefox connects to the Internet")

Then enter the IP address of the Raspberry Pi, as assigned by Hamachi, in the proxy adress. The port is 8118.

To test that the proxy is working, go to http://config.privoxy.org/ and you should see a message like "This is Privoxy on Windows [IP address], port 8118, enabled." If it's not working, you'll see a message that "Privoxy is not being used." Also, when you're using a public Wi-Fi connection, visiting WhatIsMyIP.com will show a different IP address when your proxy is turned on than when it's off (the IP address should be your home's public IP address).

That's it!

Other Raspberry Pi VPN Solutions

There are other ways to skin this cat, of course. Our favorite VPN tool (by a close margin over Hamachi), Open VPN is a good alternative, but may require a bit more tweaking (as well as a static IP or Dynamic DNS service provider). You can also set up a PPTD VPN (instructions via Brad Wells), which has the advantage of being supported by more devices, but again it's a little more involved.

For a quick-and-dirty VPN and proxy server, though, the steps above should get you up and running in no time securely networking with your Raspberry Pi.

Photo by Denise Kappa (Shutterstock), maymak (Shutterstock), Pakhnyushcha (Shutterstock), Anan Kaewkhammul (Shutterstock), A1Stock (Shutterstock), and Neyro (Shutterstock).

Number of comments

The PlayStation 4 Has A New Controller, Fancy User Accounts And Impressive Specs (So Far)

January 23rd, 2013Top Story

The PlayStation 4 Has A New Controller, Fancy User Accounts And Impressive Specs (So Far)

By Luke Plunkett

The PlayStation 4 Has A New Controller, Fancy User Accounts And Impressive Specs (So Far)Last March, we gave you an early look at how the PlayStation 4—code-named Orbis—was shaping up. Nearly a year later, we're about to bring you a clearer, more timely update, including new technical specs and information on an upgrade to Sony's traditional controller design.

The information you're about to read comes from official Orbis documentation, a hive of more than 90 PDFs about the forthcoming console. The details of the files were shared with Kotaku by an individual known as SuperDae, the same person who last year attempted to sell a pair of next-gen Xbox development kits on eBay.

What follows won't tell you when the PS4/Orbis is coming out or even what it's destined to be called. Our best sources are mixed on whether the new Sony console will be out late this year, to match the expected launch of the next-generation Xbox, or whether Sony will wait until 2014. What you will learn about below are some of the guts of the console (as they stand for now, at least) and how it works. Some of those details were familiar, matching things we'd heard before; others were new and refreshingly specific.

SPECS

We'll begin with the specs. And before we go any further, know that these are current specs for a PS4 development kit, not the final retail console itself. So while the general gist of the things you see here may be similar to what makes it into the actual commercial hardware, there's every chance some—if not all of it—changes, if only slightly.

That being the case, here's what we know is inside PS4 development kits—model # DVKT-KS000K—as of January 2013. As you'll see, some things have changed since earlier kits became available in March 2012.

  • System Memory: 8GB
  • Video Memory: 2.2 GB
  • CPU: 4x Dual-Core AMD64 "Bulldozer" (so, 8x cores)
  • GPU: AMD R10xx
  • Ports: 4x USB 3.0, 2x Ethernet
  • Drive: Blu-Ray
  • HDD: 160GB
  • Audio Output: HDMI & Optical, 2.0, 5.1 & 7.1 channels
  • If you think the HDD is small, remember, these are the specs for a machine that developers are using to make games on, not the console you'll own and be storing media on. And don't worry about having two ethernet ports; as this is a dev kit, one is there for local sharing/testing purposes.

    Interestingly, while some of these specs (such as the 8x core CPU) match with those reported by Digital Foundry only a few days ago, others like the RAM (DF reported 4GB of GDDR5, while we've heard 8GB) differ.

    We've learned there's a headphone jack on the front of the console, but it's unclear whether that's just for dev kits or is an intended feature of the final retail console.

    CONTROLLER

    The PlayStation 4 Has A New Controller, Fancy User Accounts And Impressive Specs (So Far)

    Ever since the release of the original PlayStation, Sony has maintained roughly the same basic controller design. This trend may be continuing with the PS4, because we've learned that developers are working with—and dev kits support—both the Sixaxis and DualShock 3 controller. This suggests that, for the most part, the design and capabilities of the PS4's controller will be similar to those on the PS3. The documentation also shows a Move controller, suggesting Sony's Wii-style motion wand will work with the new console.

    There is a new controller in development for the PS4, though, known internally as the Orbis Development Tool, and while it keeps many of the same features as the current pads—like the four iconic PlayStation face buttons, two thumbsticks and shoulder triggers—there's one key addition.

    THE NEXT PLAYSTATION, AT A GLANCE

    • 8GB system memory, 2.2GB video memory
    • 4x Dual-Core AMD64 "Bulldozer" CPU, AMD R10xx Liverpool GPU
    • New controller features touch pad
    • Can link PSN accounts to controllers, allowing for multiple logins.

    British site CVG speculated last week that, because they'd heard the PS4's controller was "trying to emulate the same user interface philosophies as the PS Vita", that meant it would feature a touch screen. Instead, the Orbis' controller features a capacitive touch pad, like you find on the back of a Vita (presumably it's also on the back of the PS4's controller), that can recognise two-point multi-touch. The entire pad can also be "clicked" for an additional input button.

    The PS4's controller will again be capable of motion-sensing, like its PS3 predecessors, only now with improved technology like tilt correction. It will also feature vibration, which Sony has thankfully learned is a next-gen feature you need to launch with. It'll also have an RGB LED light in it.

    While there have been reports of the PS4 controller featuring "biometric" technology, there was no mention of it in the information we were provided.

    There's one other addition to the PS4's pad you won't find on a DualShock 3: a "Share" button. We're not exactly sure what it does. The most likely use would be to allow users to share some aspect of their gaming experience to Twitter or Facebook. Maybe a screenshot? We have no idea. But that Share button might have something to do with...

    ACCOUNTS

    The PlayStation 4 Has A New Controller, Fancy User Accounts And Impressive Specs (So Far)

    Sony is trying to change the way you think about user accounts with the PS4. As it stands now, and this applies to all current consoles the PS3 (and the Wii U), when you log in, you log in as a single user. With Orbis, Sony is moving the place of "ownership" away from the console, with something it calls "multi-user simultaneous logins."

    Which means that the PS4 will let more than one person be logged into the same system at the same time. It achieves this by linking control pads to user accounts; as each new controller syncs with the system, that player's account can be logged in as well. Accounts won't be "locked" to a controller; you'll simply be prompted to sign in to an account every time an extra pad is connected to the console.

    One application we learned about for this feature would be that, were four players in a co-op battle able to defeat a boss, then all four would receive trophies.

    We only learned of this feature in relation to local accounts stored on the console itself. It's unclear whether you'd also be able to do this via the PlayStation Network if you were playing online.

    ——

    That's it for now. Remember, none of this information is confirmed, and even the information that is locked down in January 2013 may change before the console's eventual release, which is likely not for at least another nine months, at minimum. This is just what we've been told Sony is working on and planning for as of today. That being the case, how do you think it's shaping up?

Number of comments

The NAACP Pretends That Sugary Soda Is a Civil Rights Issue

January 23rd, 2013Top Story

The NAACP Pretends That Sugary Soda Is a Civil Rights Issue

By Hamilton Nolan

The NAACP Pretends That Sugary Soda Is a Civil Rights IssueNew York mayor Mike Bloomberg's crusade to ban large-sized sugary drinks has some surprising new foes: the NAACP and the Hispanic Federation, two large nonprofits ostensibly dedicated to advancing the rights of minorities. In this case, they are advancing the interests of their own corporate backers at the expense of the people they are supposed to serve.

The AP reported today that both the NAACP and the Hispanic Federation have joined the American Beverage Association's lawsuit against Bloomberg's proposal to limit sodas to 16 ounces in the city. They have joined on the side of the beverage industry, to be clear, which should be disconcerting to anyone under the impression that the NAACP still operates as a righteous group of crusading outsiders dedicated to justice, as they did during the civil rights era.

Sadly, that's not the reality any more. Like any big, powerful institution, the NAACP has settled into a role as part of the establishment. That's not to say that it doesn't support good causes or do good things any more; it's just to point out that it is well ensconced on the list of go-to places for corporate America to turn when they want to receive an Official Blessing From The Minority Community. All great social justice organizations run this risk, if they hang around long enough. They become less likely to picket Wal-Mart, and more likely to be showered with money by Wal-Mart. Just as environmental groups can be enlisted for corporate "greenwashing," so can civil rights be enlisted for corporate blackwashing. They are relatively cheap line items in a PR budget. For a donation, companies can officially place themselves on the side of civil rights and justice, even if they don't belong there.

The Hispanic Federation's annual gala is April 11, at the Waldorf-Astoria. There, they will present their "Corporate Leadership Award" to The Coca-Cola Company, which is among their funders. The NAACP has recently received a $100,000 donation from the Coca-Cola foundation, along with another $35K to the NAACP New York State Conference. They recently gave an image award to PepsiCo (which will doubtless be repaid with donations). It's quite easy for large nonprofits such as these to ensure a robust roster of future corporate funding: all they have to do is scratch these companies' backs when called upon. This is what happens with civil rights organizations become co-opted by corporate interests:

The NAACP's New York state branch and the Hispanic Federation have joined beverage makers and sellers in trying to stop the rule from taking effect March 12. Critics are attacking what they call an inconsistent and undemocratic regulation, while city officials and health experts defend it as a pioneering and proper move to fight obesity.

The issue is complex for the minority advocates, especially given that obesity rates are higher than average among blacks and Hispanics, according to the federal Centers for Disease Control and Prevention.

And why do these alleged civil rights organizations feel strongly enough about soda size, of all things, to call out their lawyers? Because "minority-owned delis and corner stores will end up at a disadvantage compared to grocery chains." The difficulties involved in restocking the shelves at your corner bodega are more important than the entire obesity issue in the black and Latino communities, by this pretend logic.

Conjuring an objection to a health program out of the flimsiest of fabric, in order to try to undermine a program that would help to address a problem plaguing the very communities that these groups are supposed to serve. Neither the NAACP nor the Hispanic Federation have any logical reason whatsoever to be involved in the minutiae of beverage size regulation. If they do decide to enter the debate, it should be on the side of the people they're supposed to help.

But the people don't write the biggest checks.

[Image by Jim Cooke]

Number of comments