diff --git a/doc/EN/installation.org b/doc/EN/installation.org index bae52439..42db13ce 100644 --- a/doc/EN/installation.org +++ b/doc/EN/installation.org @@ -7,7 +7,7 @@ #+BEGIN_CENTER [[./images/logo.png]] #+END_CENTER -| [[file:index.html][Home]] | [[Preparation for the Beaglebone Black]] | [[Checklist]] | [[Interactive Setup]] | [[Non-Interactive Setup]] | [[Post-Setup]] | [[Keydrives]] | [[On Client Machines]] | +| [[file:index.html][Home]] | [[Preparation for the Beaglebone Black]] | [[Checklist]] | [[./mesh.html][Mesh network]] | [[Interactive Setup]] | [[Non-Interactive Setup]] | [[Post-Setup]] | [[Keydrives]] | [[On Client Machines]] | * Preparation for the Beaglebone Black @@ -56,7 +56,8 @@ Before running the freedombone command you will need a few things. * It is possible to forward ports from the internet router to the system * If you want to set up a social network or microblog then you will need SSL certificates corresponding to those domains * Have ssh access to the system - +* Mesh network +If you are installing one of the mesh network variants then see [[./mesh.html][these instructions]] for details. * Interactive Setup The interactive server configuration setup is recommended for most users. On the system where freedombone is to be installed create a configuration file. diff --git a/doc/EN/mesh.org b/doc/EN/mesh.org index c592964c..124e066a 100644 --- a/doc/EN/mesh.org +++ b/doc/EN/mesh.org @@ -8,7 +8,7 @@ [[./images/logo.png]] #+END_CENTER -| [[What is a mesh network?]] | [[The Freedombone Mesh]] | [[Installation]] | +| [[What is a mesh network?]] | [[The Freedombone Mesh]] | [[Installation]] | [[Wifi adaptors]] | [[Using the mesh]] | * What is a mesh network? The internet as it currently exists is mostly organised according to a client/server model. Servers run the web services and store the data and clients are the laptops, desktops and other devices accessing the servers. In a mesh network there isn't any clear division between clients and servers. The computers on a mesh network are known as "peers" and they can perform the functions of both clients and servers. Commonly this is also known as a "peer to peer" network. @@ -25,17 +25,135 @@ Example use cases would be: * Camp sites * War zones * Scientific expeditions to remote areas - * Onboard ships - * Underground (mines/caves) - * Protests + * Onboard smaller ships without satellite internet, captain/crew communications + * Underground (mines or caves) + * Protests / Occupations of buildings + * Eventually in space for manned missions to other planets, moons or asteroids * The Freedombone Mesh -The Freedombone mesh is offline - in the sense of not being part of the larger internet - and consists of a set of computers with the system installed communicating wirelessly using ordinary wifi. Peers can enter or leave the network and it will adjust automatically. All communications between peers is end-to-end encrypted, so although it's easy to join the network it's not easy to passively evesdrop. +The Freedombone mesh is offline - in the sense of not being part of the larger internet - and consists of a set of computers with the software installed communicating wirelessly using ordinary wifi. Peers can enter or leave the network and it will adjust automatically. All communications between peers is end-to-end encrypted, so although it's easy to join the network it's not easy to passively evesdrop. * Installation ** Two types of system Installation is split into two categories, /routers/ and /user devices/. -A router is a computer which is dedicated to moving network traffic and building out the mesh infrastructure. It's not primarily intended to have a user interface. Hardware such as the Beaglebone Black is ideal for this, because it's small, inexpensive and doesn't consume much electrical power and so can be fitted in any location where an electricity supply is available. Small computers can also be battery operated or solar powered so that the mesh need not be statically sited. They could be included in a backpack for camping, fitted within moving vehicles, or on protest placards to help provide a local and transient communications system. +A router is a computer which is dedicated to moving network traffic and building out the mesh infrastructure. It's not primarily intended to have a user interface. Hardware such as the Beaglebone Black is ideal for this, because it's small, inexpensive and doesn't consume much electrical power and so can be fitted in any location where an electricity supply is available. -User devices are the computers with which you would typically access the internet - laptops, desktop machines, netbooks or any other device which can run a Debian-based distro with a working wifi connection. +Small computers acting as mesh routers can also be battery operated or solar powered so that the network need not be statically sited. They could be included in a backpack for camping, fitted within moving vehicles, strapped to protest placards or attached to large tethered helium balloons (like weather balloons) to help provide a local and transient communications system. + +/User devices/ are the computers with which you would typically access the internet - laptops, desktop machines, netbooks or any other device which can run a Debian-based distro (eg. Ubuntu) with a working wifi connection. ** Installing on routers +Whatever system you're going to use as a mesh router should have a new Debian Jessie install on it. It's advisable that this be a new install so that there is no existing software on the system which could confuse the mesh install process. Connect your system to your internet router with an ethernet cable, then ssh into it and type: + +#+BEGIN_SRC bash +su +apt-get update +apt-get install git build-essential dialog +git clone https://github.com/bashrc/freedombone +cd freedombone +make install +#+END_SRC + +At this point if you are using a system or dongle with an Atheros AR9271 wifi chipset then you may want to install some pre-compiled firmware (you can compile it from source, but it takes a long time - especially on the Beaglebone Black). If you need to do that then see the wifi adaptor notes below. + +Then to begin the install: + +#+BEGIN_SRC bash +freedombone menuconfig +#+END_SRC + +Select the "/mesh (router)/" install variant, give an ESSID or just hit enter for the default. If discression is important then use an ESSID similar to those already in the area. The ESSID must be the same on every mesh peer. Assign this mesh peer a name. In order to avoid confusions it's important that the name should be unique on the network and contain no spaces. So maybe a word followed by some numbers, or the name of the place where the router will be installed. + +If you're installing on a Beaglebone Black then after a while the system will reboot and you will need to ssh in again and run: + +#+BEGIN_SRC bash +cd freedombone +freedombone -c freedombone.cfg +#+END_SRC + +The reboot is needed in order to enable zram and the hardware random number generator. +** Installing on user devices +Typically on a laptop with a Debian-based distro installed, open a terminal and type: + +#+BEGIN_SRC bash +sudo apt-get update +sudo apt-get install git build-essential dialog +git clone https://github.com/bashrc/freedombone +cd freedombone +sudo make install +freedombone menuconfig +#+END_SRC + +Select the "/mesh (user device)/" variant and set the same ESSID as you did for the routers, or just hit enter for the default. + +An important point is that on older Debian-based systems, such as Ubuntu 14.04 or Trisquel 7, you may need to install a more recent version of /batctl/. An example is as follows. + +#+BEGIN_SRC bash +sudo apt-get remove --purge batctl +wget http://mirrors.kernel.org/ubuntu/pool/universe/b/batctl/batctl_2014.1.0-2_amd64.deb +sudo dpkg -i batctl_2014.1.0-2_amd64.deb +#+END_SRC +* Wifi adaptors +There are a small number of wifi adaptors which are compatible with a fully free software stack. +** Atheros AR9271 +To install the firmware for this: + +#+BEGIN_SRC bash +cd freedombone/drivers +sha256sum ath9k_htc_driver_bbb.tar.gz +7eb9324681f03c7630ed01e490ea447dfbd96c9b5389e45b64e4646d1be16ff1 +tar -xvzf ath9k_htc_driver_bbb.tar.gz +mv *.fw /lib/firmware +cd .. +#+END_SRC +* Using the mesh +** Switching from internet to mesh mode +To join the mesh network open a terminal and type: + +#+BEGIN_SRC bash +meshweb +#+END_SRC + +If you want to have your system as a permanent mesh peer then you could add that command to your startup applications so that it activates whenever the computer starts up. + +A web page should appear in your browser, which then allows you to access communication services on the mesh. These pages should update automatically, so that if peers enter or leave the network the lists will change accordingly. +** Chat +If you have a Tox client installed on your system then you can use that to communicate with other mesh peers. A limitation is that if peers change you may need to quit the application and restart it in order to receive the updated list of DHTnodes. The [[https://github.com/Tox/toxic][Toxic]] client is installed by default, but you may also want to install [[https://github.com/tux3/qTox][qTox]] or [[http://utox.org][uTox]] for a more conventional-looking user experience. + +You can obtain Tox IDs for users on the network via the initial web page. + +To launch the [[https://github.com/Tox/toxic][Toxic client]] in a terminal type: + +#+BEGIN_SRC bash +toxic +#+END_SRC + +The first time you will be asked whether you wish to encrypt the data file used for your settings. Select "no" for this, otherwise the system will not be able to obtain your public key and broadcast it to other peers in the network. Even if you select "yes" the system will still be usable, but it will not be so easy for other peers on the network to find you unless you have previously exchanged your Tox ID via some out-of-band method. + +Then to add a new friend: + +#+BEGIN_SRC bash +/nick mynickname +/add +#+END_SRC + +Your friend will need to approve the request, and then you can chat via text or voice using /CTRL-o/ and /CTRL-p/ to switch between screens and cursor keys plus Enter to select users. + +A note for the security-conscious is that broadcasting Tox IDs via the network (using Avahi) is convenient but not highly secure. An adversary could maybe join the network and create decoy peers to try to disrupt the communications and have messages going to the wrong places. For the best security exchange Tox IDs in advance by some method other than looking them up from the initial mesh web page. +** Blogging +The Freedombone mesh uses a fully decentralized blogging system called [[https://github.com/HelloZeroNet/ZeroBlog][ZeroBlog]]. It behaves rather like other peer-to-peer file sharing systems in that if you are reading the blog of another user you are also simultaneously seeding it to other peers (acting as both a client and a server). This allows the system to scale well, while also being robust to any peer failing or leaving the network. + +All blogs on the mesh are public, so any user joining the mesh can read any other blog. Network traffic is encrypted between peers, so passive snooping will be hard, and also the integrity of data is checked via certificates so that you can be reasonably confident that nefarious content has not been added or removed from the data stream while in transit through the network. + +This type of content creation and delivery provides a good template for what the conventional internet should ultimately be like if it is to be robust, trustworthy and resistant to censorship or damage. + +To add a new blog entry click the /new post/ button, edit the title and content (clicking /save/ at the bottom of the screen after each). Then when you are done click on the /publish/ button at the bottom of the screen. And that's all there is to it. +** Other services +It is hoped that a decentralized forum will be added, but this is not yet complete. In the mean time a substitute is to use the Tox group chat feature. +** Turing off the mesh +If you wish to return to the internet then open a terminal and type: + +#+BEGIN_SRC bash +sudo batman stop +#+END_SRC + +After a few seconds your usual internet wifi connection should be re-established. diff --git a/website/EN/installation.html b/website/EN/installation.html index b71195c3..4e7a39c7 100644 --- a/website/EN/installation.html +++ b/website/EN/installation.html @@ -4,7 +4,7 @@ - + @@ -179,6 +179,8 @@ for the JavaScript code in this tag. + + @@ -186,6 +188,7 @@ for the JavaScript code in this tag. Home Preparation for the Beaglebone Black Checklist +Mesh network Interactive Setup Non-Interactive Setup Post-Setup @@ -274,7 +277,14 @@ Before running the freedombone command you will need a few things. - +
+

Mesh network

+
+

+If you are installing one of the mesh network variants then see these instructions for details. +

+
+

Interactive Setup

@@ -395,33 +405,33 @@ Also see the manpage for additional options which can be used instead of a confi
-
-

Social Key Management

-
+
+

Social Key Management

+

If you are using the interactive installer then you will be aked if you wish to import GPG keys. If you don't already possess GPG keys then just select "Ok" and they will be generated during the install. If you do already have GPG keys then there are a few possibilities

-
-

You have the gnupg keyring on an encrypted USB drive

-
+
+

You have the gnupg keyring on an encrypted USB drive

+

If you previously made a master keydrive containing the full keyring (the .gnupg directory). This is the most straightforward case, but not as secure as splitting the key into fragments.

-
-

You have a number of key fragments on USB drives retrieved from friends

-
+
+

You have a number of key fragments on USB drives retrieved from friends

+

If you previously made some USB drives containing key fragments then retrieve them from your friends and plug them in one after the other. After the last drive has been read then remove it and just select "Ok". The system will then try to reconstruct the key. For this to work you will need to have previously made three or more Keydrives.

-
-

You can specify some ssh login details for friends servers containing key fragments

-
+
+

You can specify some ssh login details for friends servers containing key fragments

+

Enter three or more sets of login details and the installer will try to retrieve key fragments and then assemble them into the full key. This only works if you previously were using remote backups and had social key management enabled.

@@ -564,9 +574,9 @@ On your internet router, typically under firewall settings, open the following p After installing for the first time it's a good idea to create some keydrives. These will store your gpg key so that if all else fails you will still be able to restore from backup. There are two ways to do this:

-
-

Master Keydrive

-
+
+

Master Keydrive

+

This is the traditional security model in which you carry your full keyring on an encrypted USB drive. To make a master keydrive first format a USB drive as a LUKS encrypted drive. In Ubuntu this can be done from the Disk Utility application. Then plug it into the Freedombone system, then from your local machine run:

@@ -586,9 +596,9 @@ If you are on a Beaglebone Black then use sda rather than sdb for

-
-

Fragment keydrives

-
+
+

Fragment keydrives

+

This breaks your GPG key into a number of fragments and randomly selects one to add to the USB drive. First format a USB drive as a LUKS encrypted drive. In Ubuntu this can be done from the Disk Utility application. Plug it into the Freedombone system then from your local machine run the following commands:

diff --git a/website/EN/mesh.html b/website/EN/mesh.html new file mode 100644 index 00000000..34f75869 --- /dev/null +++ b/website/EN/mesh.html @@ -0,0 +1,525 @@ + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+

logo.png +

+
+
+ + + + +++ ++ ++ ++ ++ + + + + + + + + + +
What is a mesh network?The Freedombone MeshInstallationWifi adaptorsUsing the mesh
+ +
+

What is a mesh network?

+
+

+The internet as it currently exists is mostly organised according to a client/server model. Servers run the web services and store the data and clients are the laptops, desktops and other devices accessing the servers. In a mesh network there isn't any clear division between clients and servers. The computers on a mesh network are known as "peers" and they can perform the functions of both clients and servers. Commonly this is also known as a "peer to peer" network. +

+ +

+The client/server and mesh network models have advantages and disadvantages. If the server in a client/server system fails then you can have catastrophic service outages which affect many users. If a peer in a mesh network fails then the other peers may be mostly unaffected and communications can continue. The disadvantage of mesh networks is that each peer relays data for other peers and so the bandwidth usage by each peer may be higher than for a client in a client/server system. However, with modern hardware that's not much of an issue. +

+ +

+Mesh networks are useful for building local and highly resillient communications infrastructure which can be put together rapidly, in situations where the ordinary internet is either unavailable or untrustworthy. +

+ +

+Example use cases would be: +

+ +
    +
  • Conferences / Exhibitions
  • +
  • Local community networks, not run by telcos or ISPs
  • +
  • Emergency services / Disaster relief
  • +
  • Camp sites
  • +
  • War zones
  • +
  • Scientific expeditions to remote areas
  • +
  • Onboard smaller ships without satellite internet, captain/crew communications
  • +
  • Underground (mines or caves)
  • +
  • Protests / Occupations of buildings
  • +
  • Eventually in space for manned missions to other planets, moons or asteroids
  • +
+
+
+ +
+

The Freedombone Mesh

+
+

+The Freedombone mesh is offline - in the sense of not being part of the larger internet - and consists of a set of computers with the software installed communicating wirelessly using ordinary wifi. Peers can enter or leave the network and it will adjust automatically. All communications between peers is end-to-end encrypted, so although it's easy to join the network it's not easy to passively evesdrop. +

+
+
+
+

Installation

+
+
+

Two types of system

+
+

+Installation is split into two categories, routers and user devices. +

+ +

+A router is a computer which is dedicated to moving network traffic and building out the mesh infrastructure. It's not primarily intended to have a user interface. Hardware such as the Beaglebone Black is ideal for this, because it's small, inexpensive and doesn't consume much electrical power and so can be fitted in any location where an electricity supply is available. +

+ +

+Small computers acting as mesh routers can also be battery operated or solar powered so that the network need not be statically sited. They could be included in a backpack for camping, fitted within moving vehicles, strapped to protest placards or attached to large tethered helium balloons (like weather balloons) to help provide a local and transient communications system. +

+ +

+User devices are the computers with which you would typically access the internet - laptops, desktop machines, netbooks or any other device which can run a Debian-based distro (eg. Ubuntu) with a working wifi connection. +

+
+
+
+

Installing on routers

+
+

+Whatever system you're going to use as a mesh router should have a new Debian Jessie install on it. It's advisable that this be a new install so that there is no existing software on the system which could confuse the mesh install process. Connect your system to your internet router with an ethernet cable, then ssh into it and type: +

+ +
+ +
su
+apt-get update
+apt-get install git build-essential dialog
+git clone https://github.com/bashrc/freedombone
+cd freedombone
+make install
+
+
+ +

+At this point if you are using a system or dongle with an Atheros AR9271 wifi chipset then you may want to install some pre-compiled firmware (you can compile it from source, but it takes a long time - especially on the Beaglebone Black). If you need to do that then see the wifi adaptor notes below. +

+ +

+Then to begin the install: +

+ +
+ +
freedombone menuconfig
+
+
+ +

+Select the "mesh (router)" install variant, give an ESSID or just hit enter for the default. If discression is important then use an ESSID similar to those already in the area. The ESSID must be the same on every mesh peer. Assign this mesh peer a name. In order to avoid confusions it's important that the name should be unique on the network and contain no spaces. So maybe a word followed by some numbers, or the name of the place where the router will be installed. +

+ +

+If you're installing on a Beaglebone Black then after a while the system will reboot and you will need to ssh in again and run: +

+ +
+ +
cd freedombone
+freedombone -c freedombone.cfg
+
+
+ +

+The reboot is needed in order to enable zram and the hardware random number generator. +

+
+
+
+

Installing on user devices

+
+

+Typically on a laptop with a Debian-based distro installed, open a terminal and type: +

+ +
+ +
sudo apt-get update
+sudo apt-get install git build-essential dialog
+git clone https://github.com/bashrc/freedombone
+cd freedombone
+sudo make install
+freedombone menuconfig
+
+
+ +

+Select the "mesh (user device)" variant and set the same ESSID as you did for the routers, or just hit enter for the default. +

+ +

+An important point is that on older Debian-based systems, such as Ubuntu 14.04 or Trisquel 7, you may need to install a more recent version of batctl. An example is as follows. +

+ +
+ +
sudo apt-get remove --purge batctl
+wget http://mirrors.kernel.org/ubuntu/pool/universe/b/batctl/batctl_2014.1.0-2_amd64.deb
+sudo dpkg -i batctl_2014.1.0-2_amd64.deb
+
+
+
+
+
+
+

Wifi adaptors

+
+

+There are a small number of wifi adaptors which are compatible with a fully free software stack. +

+
+
+

Atheros AR9271

+
+

+To install the firmware for this: +

+ +
+ +
cd freedombone/drivers
+sha256sum ath9k_htc_driver_bbb.tar.gz
+7eb9324681f03c7630ed01e490ea447dfbd96c9b5389e45b64e4646d1be16ff1
+tar -xvzf ath9k_htc_driver_bbb.tar.gz
+mv *.fw /lib/firmware
+cd ..
+
+
+
+
+
+
+

Using the mesh

+
+
+

Switching from internet to mesh mode

+
+

+To join the mesh network open a terminal and type: +

+ +
+ +
meshweb
+
+
+ +

+If you want to have your system as a permanent mesh peer then you could add that command to your startup applications so that it activates whenever the computer starts up. +

+ +

+A web page should appear in your browser, which then allows you to access communication services on the mesh. These pages should update automatically, so that if peers enter or leave the network the lists will change accordingly. +

+
+
+
+

Chat

+
+

+If you have a Tox client installed on your system then you can use that to communicate with other mesh peers. A limitation is that if peers change you may need to quit the application and restart it in order to receive the updated list of DHTnodes. The Toxic client is installed by default, but you may also want to install qTox or uTox for a more conventional-looking user experience. +

+ +

+You can obtain Tox IDs for users on the network via the initial web page. +

+ +

+To launch the Toxic client in a terminal type: +

+ +
+ +
toxic
+
+
+ +

+The first time you will be asked whether you wish to encrypt the data file used for your settings. Select "no" for this, otherwise the system will not be able to obtain your public key and broadcast it to other peers in the network. Even if you select "yes" the system will still be usable, but it will not be so easy for other peers on the network to find you unless you have previously exchanged your Tox ID via some out-of-band method. +

+ +

+Then to add a new friend: +

+ +
+ +
/nick mynickname
+/add <friend Tox ID>
+
+
+ +

+Your friend will need to approve the request, and then you can chat via text or voice using CTRL-o and CTRL-p to switch between screens and cursor keys plus Enter to select users. +

+ +

+A note for the security-conscious is that broadcasting Tox IDs via the network (using Avahi) is convenient but not highly secure. An adversary could maybe join the network and create decoy peers to try to disrupt the communications and have messages going to the wrong places. For the best security exchange Tox IDs in advance by some method other than looking them up from the initial mesh web page. +

+
+
+
+

Blogging

+
+

+The Freedombone mesh uses a fully decentralized blogging system called ZeroBlog. It behaves rather like other peer-to-peer file sharing systems in that if you are reading the blog of another user you are also simultaneously seeding it to other peers (acting as both a client and a server). This allows the system to scale well, while also being robust to any peer failing or leaving the network. +

+ +

+All blogs on the mesh are public, so any user joining the mesh can read any other blog. Network traffic is encrypted between peers, so passive snooping will be hard, and also the integrity of data is checked via certificates so that you can be reasonably confident that nefarious content has not been added or removed from the data stream while in transit through the network. +

+ +

+This type of content creation and delivery provides a good template for what the conventional internet should ultimately be like if it is to be robust, trustworthy and resistant to censorship or damage. +

+ +

+To add a new blog entry click the new post button, edit the title and content (clicking save at the bottom of the screen after each). Then when you are done click on the publish button at the bottom of the screen. And that's all there is to it. +

+
+
+
+

Other services

+
+

+It is hoped that a decentralized forum will be added, but this is not yet complete. In the mean time a substitute is to use the Tox group chat feature. +

+
+
+
+

Turing off the mesh

+
+

+If you wish to return to the internet then open a terminal and type: +

+ +
+ +
sudo batman stop
+
+
+ +

+After a few seconds your usual internet wifi connection should be re-established. +

+
+
+
+
+
+ + + + + + +
+ + diff --git a/website/EN/variants.html b/website/EN/variants.html index e3493156..d8cdc091 100644 --- a/website/EN/variants.html +++ b/website/EN/variants.html @@ -4,7 +4,7 @@ - + @@ -225,12 +225,7 @@ Freedombone may be installed either in its entirety or as different variants wit Mesh -Mesh network bridge to the internet - - - -Nonmailbox -Installs eveything except for the email server +A wireless mesh network which is like the internet, but not the internet