Tinkernut Labs
Basic overview of what we will be doing
Learn how to connect to a darknet by setting up a Raspberry Pi as a node to the Project Meshnet Hyperboria network.
Useful Links
No products in the cart.
Learn how to connect to a darknet by setting up a Raspberry Pi as a node to the Project Meshnet Hyperboria network.
Useful Links
Before connecting to a mesnet or a “darknet”, it’s important to understand what that really means. The video to the left should help enlighten you and bring you up to speed as to what it is we’re intending to do.
The next thing you need to be aware of is how to get a Raspberry Pi up and running. So that’s what we’ll take a look at in the next step.
As with all new Raspberry Pi installations, you need to download and install the OS. The OS we’ll be using is the Raspbian OS. Clicking that link will download an image file that you will then need to burn to an SD card.
If you are using Windows, then you can burn the image using Win32DiskImager. It will take several minutes to complete, but when it’s through you can eject your card and install it in your Raspberry Pi device. Then with a keyboard, mouse, monitor and wireless plugged in, plug in the power and let it boot up.
Once it boots up, you’ll be presented with some configuration options. The first option to expand the SD card is the only one you really need to do. Once you’ve chosen to do that, finish out of the config, let the pi reboot, and then you’ll see the login prompt. The default login is pi as the username and raspberry as the password. Now we’re ready for the next step!
Before we can start downloading and installing anything, we first need to update the Gnu Compiler Collection (GCC) on the Pi. The reason why is because the Pi ships with a GCC version of 4.6 and CJDNS requires a version of 4.7 or later. Unfortunately the current Wheezy linux distribution for the Pi doesn’t have any newer versions of GCC that we can apt-get install. So the trick is to add the Jessie distribution to our sources list and install it from there. You can refer to the WideOpenSpace blog for more details. Here’s how to do it.
sudo nano /etc/apt/sources.list
# Source repository to add deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi # Source repository to add deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
sudo nano /etc/apt/preferences
Package: * Pin: release n=wheezy Pin-Priority: 900 Package: * Pin: release n=jessie Pin-Priority: 300 Package: * Pin: release o=Raspbian Pin-Priority: -10
sudo apt-get update
sudo apt-get install -t jessie gcc-4.8 g++-4.8
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
sudo gcc --version
The Project Meshnet wiki has some great resources and documentation for installing and getting started with CJDNS. You are more than welcome to use those resources for installing CJDNS if you want. For this guide, however, I will be using a different method. The wiki at cryptoanarcy.freed0m4all.net has created a fantastic little linux script to automate this whole process. Let’s give it a try:
sudo rm /etc/apt/preferences
git clone git://gist.github.com/3435341.git cjdns_init_script
cd cjdns_init_script
sudo ln -s /path/to/script/hyperboria.sh /etc/init.d/cjdns
sudo chmod +x /etc/init.d/cjdns
sudo /etc/init.d/cjdns install
At this point, you will be prompted with the cjdroute.conf page where you’re wanted to enter the peering information of someone that is already connected to the hyperboria network. The next step will explain the process for doing that.
The official Project Meshnet installation guide suggests that Peering information should be asked for instead of simply being handed out. They list a number of reasons for doing so, but the main reason is to prevent abuse of the system. So here’s some options they list for requesting peering information:
I opted for the chat client because of the more instant responses. The peering information should look something like this (the below information is an example and does not work):
"192.168.2.3:45678": { "password": "thisIsNotARealConnection_1", "publicKey": "thisIsJustForAnExampleDoNotUseThisInYourConfFile_1.k" }
Where you have an IP address/port number, a password, and a public key. You want to paste this information in your cjdroute.conf file under the section called
//Nodes to connect to (IPv4 only).
The Hyperboria network is the connection and unification of all the local Project Meshnet nodes into a much larger network. Once you have your peering information saved in the cjdroute.conf file, then you can start up CJDNS and connect to websites on the Hyperboria network. But since CJDNS requires the IPv6 protocol, you need to activate the IPv6 adapter on your Pi first.
sudo modprobe ipv6
sudo /etc/init.d/cjdns start
ping6 www.uppit.us
These commands activate the IPv6 protocol, start the cjdns server, and ping the uppit.us website that is only available on the Hyperboria network. You can find a large list of other sites on this wiki page.
Now what you can do is type “startx” to start the desktop and then open up a web browser to visually browse the Hypberboria network.
All that’s left to do now is to allow inbound connections to connect to your node so that you can share the Hyperboria network with others in your area!