Skip to content

Instantly share code, notes, and snippets.

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2015-09-24-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@sagarun
sagarun / gist:8f19b312ed95e678fc51
Created January 20, 2016 23:24
tiny IPA build
sudo make
[sudo] password for saga:
./build-tinyipa.sh
++ xargs dirname
++ readlink -f ./build-tinyipa.sh
+ WORKDIR=/home/saga/ironic-python-agent/imagebuild/tinyipa
+ BUILDDIR=/home/saga/ironic-python-agent/imagebuild/tinyipa/tinyipabuild
+ BUILD_AND_INSTALL_TINYIPA=false
+ sudo -v
+ '[' -d /home/saga/ironic-python-agent/imagebuild/tinyipa/tinyipabuild ']'
@property
def requiredSpace(self):
byte_count = sum(m.size for m in self.archive.getmembers())
return byte_count / (1024.0 * 1024.0) # FIXME: Size
@sagarun
sagarun / gist:5736341
Last active December 18, 2015 05:59
Extract a specific file from a 7z archive
# List contents a 7z archive
$ 7za l example.7z
# Command to extract only pdf files from a 7z archive
$ 7za x example.7z -ir\!"*.pdf"
@sagarun
sagarun / gist:5669975
Created May 29, 2013 12:39
64 bit or 32 bit? python magic
is_64bit = sys.maxsize > 2**32
if is_64bit:
print "64 bit"
else:
print "32 bit"