Browse Source

Move docs

Bob Mottram 10 years ago
parent
commit
2eae676c3a

doc/backups.org → doc/gb/backups.org View File


doc/beaglebone.txt → doc/gb/beaglebone.txt View File


doc/code.org → doc/gb/code.org View File


doc/faq.org → doc/gb/faq.org View File


doc/index.org → doc/gb/index.org View File


doc/installation.org → doc/gb/installation.org View File


doc/related.org → doc/gb/related.org View File


doc/support.org → doc/gb/support.org View File


doc/usage.org → doc/gb/usage.org View File


doc/variants.org → doc/gb/variants.org View File


+ 120
- 0
doc/us/backups.org View File

@@ -0,0 +1,120 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+#+BEGIN_CENTER
12
+#+ATTR_HTML: :border -1
13
+| [[file:index.html][Home]]                  |
14
+| [[Backup to USB]]         |
15
+| [[Restore from USB]]      |
16
+| [[Distributed backups]]   |
17
+| [[Restore from a friend]] |
18
+#+END_CENTER
19
+
20
+* Backup to USB
21
+Insert a USB thumb drive into the front socket of the Beaglebone Black.
22
+
23
+Log into the system and become the root user, then run the /backup/ command.
24
+
25
+#+BEGIN_SRC bash
26
+su username@domainname -p 2222
27
+su
28
+backup
29
+#+END_SRC
30
+
31
+If this is the first time that you've made a backup then you will be prompted for your GPG key password.
32
+
33
+When the backup ends remove the USB drive and keep it somewhere safe. Even if it gets lost or falls into the wrong hands the content is encrypted and so is unlikely to become a source of leaks.
34
+* Restore from USB
35
+Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
36
+
37
+Log into the system and become the root user, then run the /restore/ command.
38
+
39
+#+BEGIN_SRC bash
40
+su username@domainname -p 2222
41
+su
42
+restore
43
+#+END_SRC
44
+
45
+You will be prompted to enter your GPG key password, then when the restore is complete you can remove the USB drive.
46
+* Distributed backups
47
+Distributed backups are a better way of ensuring the persistence of your data, such that even if your system gets stolen or destroyed then the data will still be recoverable from your friends. Since the backups are encrypted your friends (or anyone else with access to their systems) won't be able to read your backed up content even if their systems are subsequently compromised.
48
+
49
+Firstly you will need to have a user account on one or more of your friends servers.  They don't necessarily need to be using Freedombone, just some version of GNU/Linux with ssh access.  They can create a user account for you with the *adduser <username>* command when logged in as root and then give you the username and password via a secure method, such as on paper or via an encrypted email or via an XMPP chat using OTR. Make sure that the password used is a strong one - preferably a long random string stored in a password manager - so that dictionary attacks will fail. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.
50
+
51
+To add friends servers create a file called /backup.list/ in the following way.
52
+
53
+#+BEGIN_SRC bash
54
+ssh username@domainname -p 2222
55
+emacs ~/backup.list
56
+#+END_SRC
57
+
58
+Add entries like this. The numbers are the ssh port number to log in on.
59
+
60
+#+BEGIN_SRC bash
61
+username1@frienddomain1:2222//home/username1 ssh_password1
62
+username2@frienddomain2:2222//home/username2 ssh_password2
63
+...
64
+#+END_SRC
65
+
66
+Save and exit with *CTRL-x CTRL-s* then *CTRL-x CTRL-c*, then type *exit*.
67
+
68
+The system will try to backup to these remote locations once per day.
69
+* Restore from a friend
70
+** With a completely new Freedombone installation
71
+This is the ultimate disaster recovery scenario in which you are beginning completely from scratch with new hardware and a new Freedombone installation. It is assumed that the old hardware was destroyed, but that you have the passwords stored within a password manager on a USB thumb drive.
72
+
73
+First log in and create a new friends list:
74
+
75
+#+BEGIN_SRC bash
76
+ssh username@domainname -p 2222
77
+emacs ~/backup.list
78
+#+END_SRC
79
+
80
+Add entries like this. The numbers are the ssh port number to log in on.
81
+
82
+#+BEGIN_SRC bash
83
+username1@frienddomain1:2222//home/username1 ssh_password1
84
+username2@frienddomain2:2222//home/username2 ssh_password2
85
+...
86
+#+END_SRC
87
+
88
+Save and exit with *CTRL-x CTRL-s* then *CTRL-x CTRL-c*.
89
+
90
+Now log in as root and edit the restore script.
91
+
92
+#+BEGIN_SRC bash
93
+su
94
+emacs /usr/bin/restorefromfriend
95
+#+END_SRC
96
+
97
+Recover your backup password from your password manager and set the PASSPHRASE variable accordingly.
98
+
99
+Save and exit with *CTRL-x CTRL-s* and *CTRL-x CTRL-c*.
100
+
101
+Then use the command:
102
+
103
+#+BEGIN_SRC bash
104
+restorefromfriend <friends server domain name>
105
+#+END_SRC
106
+** On an existing Freedombone installation
107
+This is for more common situations in which maybe some data became corrupted and you want to restore it.
108
+
109
+Log in as root:
110
+
111
+#+BEGIN_SRC bash
112
+ssh username@domainname -p 2222
113
+su
114
+#+END_SRC
115
+
116
+Then use the command:
117
+
118
+#+BEGIN_SRC bash
119
+restorefromfriend <friends server domain name>
120
+#+END_SRC

+ 8386
- 0
doc/us/beaglebone.txt
File diff suppressed because it is too large
View File


+ 17
- 0
doc/us/code.org View File

@@ -0,0 +1,17 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+| [[file:index.html][Home]] |
12
+
13
+Freedombone is really just a couple of [[http://www.gnu.org/software/bash][bash]] scripts which install and configure software on a Debian GNU/Linux system. If you're a system administrator, software engineer or Linux hobbyist you'll probably be familiar with command line scripting and be able to make your own modifications or custom variants to suit your needs. Freedombone is licensed under the [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][GNU General Public License version 3]].
14
+
15
+You can find the source code for this project [[https://github.com/bashrc/freedombone][on Github]].
16
+
17
+Bugs or feature requests should be [[https://github.com/bashrc/freedombone/issues][entered here]].

+ 246
- 0
doc/us/faq.org View File

@@ -0,0 +1,246 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+#+BEGIN_CENTER
12
+#+ATTR_HTML: :border -1
13
+| [[file:index.html][Home]]                                                                       |
14
+| [[Why not supply a disk image download?]]                                      |
15
+| [[Is metadata protected?]]                                                     |
16
+| [[Why isn't dynamic DNS working?]]                                             |
17
+| [[How do I get a domain name?]]                                                |
18
+| [[How do I get a "real" SSL certificate?]]                                     |
19
+| [[Why use self-signed certificates?]]                                          |
20
+| [[Why not use the services of $company instead? They took the Seppuku pledge]] |
21
+#+END_CENTER
22
+
23
+* Why not supply a disk image download?
24
+Shipping a Freedombone disk image ready to install on a flash disk would be easy, but disk images are relatively opaque. It would be quite easy to hide something nasty within a disk image and the user might never know. To guard against that possibility installing via the *freedombone* command is a lot more transparent, since it's really just a bash script. You can check the script code to see exactly what it's doing, and the packages are all downloaded from standard Debian repos (you can even choose which one you trust) or git repos. Doing it this way the system is fully auditable, whereas when shipping a disk image it's harder to be confident that no nefarious extras have been added.
25
+* Is metadata protected?
26
+Even when using Freedombone metadata analysis by third parties is still possible. They might have a much harder time knowing what the content is, but they can potentially construct extensive dossiers based upon who communicated with your server when.  Metadata leakage is a general problem with most current web systems and it is hoped that more secure technology will become available in future. But for now if metadata protection is your main concern using Freedombone won't help.
27
+* Why isn't dynamic DNS working?
28
+If you run the command:
29
+
30
+#+BEGIN_SRC bash
31
+service inadyn status
32
+#+END_SRC
33
+
34
+And see some error related to checking for changes in the IP address then you can try other external IP services. Edit */etc/inadyn.conf* and change the domain for the *checkip-url* parameter. Possible sites are:
35
+
36
+#+BEGIN_SRC bash
37
+https://check.torproject.org/
38
+https://www.whatsmydns.net/whats-my-ip-address.html
39
+https://www.privateinternetaccess.com/pages/whats-my-ip/
40
+http://checkip.two-dns.de
41
+http://ip.dnsexit.com
42
+http://ifconfig.me/ip
43
+http://ipecho.net/plain
44
+http://checkip.dyndns.org/plain
45
+http://ipogre.com/linux.php
46
+http://whatismyipaddress.com/
47
+http://ip.my-proxy.com/
48
+http://websiteipaddress.com/WhatIsMyIp
49
+http://getmyipaddress.org/
50
+http://www.my-ip-address.net/
51
+http://myexternalip.com/raw
52
+http://www.canyouseeme.org/
53
+http://www.trackip.net/
54
+http://icanhazip.com/
55
+http://www.iplocation.net/
56
+http://www.howtofindmyipaddress.com/
57
+http://www.ipchicken.com/
58
+http://whatsmyip.net/
59
+http://www.ip-adress.com/
60
+http://checkmyip.com/
61
+http://www.tracemyip.org/
62
+http://checkmyip.net/
63
+http://www.lawrencegoetz.com/programs/ipinfo/
64
+http://www.findmyip.co/
65
+http://ip-lookup.net/
66
+http://www.dslreports.com/whois
67
+http://www.mon-ip.com/en/my-ip/
68
+http://www.myip.ru
69
+http://ipgoat.com/
70
+http://www.myipnumber.com/my-ip-address.asp
71
+http://www.whatsmyipaddress.net/
72
+http://formyip.com/
73
+http://www.displaymyip.com/
74
+http://www.bobborst.com/tools/whatsmyip/
75
+http://www.geoiptool.com/
76
+http://checkip.dyndns.com/
77
+http://myexternalip.com/
78
+http://www.ip-adress.eu/
79
+http://www.infosniper.net/
80
+http://wtfismyip.com/
81
+http://ipinfo.io/
82
+http://httpbin.org/ip
83
+#+END_SRC
84
+
85
+* How do I get a domain name?
86
+Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.
87
+
88
+Remove any existing nameservers for your domain (or select "custom" nameservers), then add:
89
+
90
+#+BEGIN_SRC bash
91
+NS1.AFRAID.ORG
92
+NS2.AFRAID.ORG
93
+NS3.AFRAID.ORG
94
+NS4.AFRAID.ORG
95
+#+END_SRC
96
+
97
+It might take a few minutes for the above change to take effect.  Within freedns click on "Domains" and add your domains (this might only be available to paid members).  Make sure that they're marked as "private".
98
+
99
+Select "Subdomains" from the menu on the left then select the MX entry for your domain and change the destination to *10:mydomainname* rather than *10:mail.mydomainname*.
100
+
101
+To route email to one of your freedns domains:
102
+
103
+#+BEGIN_SRC bash
104
+editor /etc/mailname
105
+#+END_SRC
106
+
107
+Add any extra domains which you own, then save and exit.
108
+
109
+#+BEGIN_SRC bash
110
+editor /etc/exim4/update-exim4.conf.conf
111
+#+END_SRC
112
+
113
+Within dc_other_hostnames add your extra domain names, separated by a colon ':' character.
114
+
115
+Save and exit, then restart exim.
116
+
117
+#+BEGIN_SRC bash
118
+update-exim4.conf.template -r
119
+update-exim4.conf
120
+service exim4 restart
121
+#+END_SRC
122
+
123
+You should now be able to send an email from /postmaster@mynewdomainname/ and it should arrive in your inbox.
124
+
125
+* How do I get a "real" SSL certificate?
126
+You can obtain a free "official" (as in recognised by default by web browsers) SSL certificate from [[https://www.startssl.com/][StartSSL]]. You will first need to have bought a domain name, since it's not possible to obtain one for a freedns subdomain, so see [[Using your own domain]] for details of how to do that.  You should also have tested that you can send email to the domain and receive it on the Freedombone (via Mutt or any other email client).
127
+
128
+When creating a SSL certificate it's important that the private key (the private component of the public/private pair in [[https://en.wikipedia.org/wiki/Public-key_cryptography][public key cryptography]]) be generated on the Freedombone /and remain there/.  Don't generate the private key via the StartSSL certificate wizard because this means that potentially they may retain a copy of it which could then be exfiltrated either via [[https://en.wikipedia.org/wiki/Lavabit][Lavabit]] style methodology, "implants", compromised sysadmins or other "side channel" methods.  So that the private key isn't broadcast on the internet we can instead generate a certificate request, which is really just a request for authorisation of a public key.
129
+
130
+Firstly you should have a web server site configuration ready to go. See [[Setting up a web site]] for details.
131
+
132
+Within StartSSL under the validations wizard validate your domain, which means sending an email to it and confirming a code.
133
+
134
+Now we can generate the certificate request as follows.
135
+
136
+#+BEGIN_SRC bash
137
+export HOSTNAME=mydomainname.com
138
+openssl genrsa -out /etc/ssl/private/$HOSTNAME.key 2048
139
+chown root:ssl-cert /etc/ssl/private/$HOSTNAME.key
140
+chmod 440 /etc/ssl/private/$HOSTNAME.key
141
+mkdir /etc/ssl/requests
142
+#+END_SRC
143
+
144
+Now make a certificate request as follows.  You should copy and paste the whole of this, not just line by line.
145
+
146
+#+BEGIN_SRC bash
147
+openssl req -new -sha256 -key /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/requests/$HOSTNAME.csr
148
+#+END_SRC
149
+
150
+For the email address it's a good idea to use postmaster@mydomainname.
151
+
152
+Use a random 20 character password, and keep a note of it.  We'll remove this later.
153
+
154
+View the request with:
155
+
156
+#+BEGIN_SRC bash
157
+cat /etc/ssl/requests/$HOSTNAME.csr
158
+#+END_SRC
159
+
160
+You can then click on "skip" within the StartSSL certificates wizard and copy and paste the encrypted request into the text entry box.  A confirmation will be emailed back to you normally within a few hours.
161
+
162
+Log into your StartSSL account and select *Retrieve Certificate* from the *Tool Box* tab.  Copy the text.
163
+
164
+#+BEGIN_SRC bash
165
+editor /etc/ssl/certs/$HOSTNAME.crt
166
+#+END_SRC
167
+
168
+Paste the public key, then save and exit.  Then on the Freedombone.
169
+
170
+#+BEGIN_SRC bash
171
+mkdir /etc/ssl/roots
172
+mkdir /etc/ssl/chains
173
+wget "http://www.startssl.com/certs/ca.pem" --output-document="/etc/ssl/roots/startssl-root.ca"
174
+wget "http://www.startssl.com/certs/sub.class1.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class1.server.ca.pem"
175
+wget "http://www.startssl.com/certs/sub.class2.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class2.server.ca.pem"
176
+wget "http://www.startssl.com/certs/sub.class3.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class3.server.ca.pem"
177
+ln -s "/etc/ssl/roots/startssl-root.ca" "/etc/ssl/roots/$HOSTNAME-root.ca"
178
+ln -s "/etc/ssl/chains/startssl-sub.class1.server.ca.pem" "/etc/ssl/chains/$HOSTNAME.ca"
179
+cp "/etc/ssl/certs/$HOSTNAME.crt" "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
180
+test -e "/etc/ssl/chains/$HOSTNAME.ca" && cat "/etc/ssl/chains/$HOSTNAME.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
181
+test -e "/etc/ssl/roots/$HOSTNAME-root.ca" && cat "/etc/ssl/roots/$HOSTNAME-root.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
182
+#+END_SRC
183
+
184
+To avoid any possibility of the certificates being accidentally overwritten by self-signed ones at a later date you can create backups.
185
+
186
+#+BEGIN_SRC bash
187
+mkdir /etc/ssl/backups
188
+mkdir /etc/ssl/backups/certs
189
+mkdir /etc/ssl/backups/private
190
+cp /etc/ssl/certs/$HOSTNAME* /etc/ssl/backups/certs/
191
+cp /etc/ssl/private/$HOSTNAME* /etc/ssl/backups/private/
192
+chmod -R 400 /etc/ssl/backups/certs/*
193
+chmod -R 400 /etc/ssl/backups/private/*
194
+#+END_SRC
195
+
196
+Remove the certificate password, so if the server is rebooted then it won't wait indefinitely for a non-existant keyboard user to type in a password.
197
+
198
+#+BEGIN_SRC bash
199
+openssl rsa -in /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/private/$HOSTNAME.new.key
200
+cp /etc/ssl/private/$HOSTNAME.new.key /etc/ssl/private/$HOSTNAME.key
201
+shred -zu /etc/ssl/private/$HOSTNAME.new.key
202
+#+END_SRC
203
+
204
+Create a bundled certificate which joins the certificate and chain file together.
205
+
206
+#+BEGIN_SRC bash
207
+cat /etc/ssl/certs/$HOSTNAME.crt /etc/ssl/chains/startssl-sub.class1.server.ca.pem > /etc/ssl/certs/$HOSTNAME.bundle.crt
208
+#+END_SRC
209
+
210
+And also add it to the overall bundle of certificates for the Freedombone. This will allow you to easily install the certificates onto other systems.
211
+
212
+#+BEGIN_SRC bash
213
+mkdir /etc/ssl/mycerts
214
+cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
215
+cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
216
+tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
217
+#+END_SRC
218
+
219
+Edit your configuration file.
220
+
221
+#+BEGIN_SRC bash
222
+editor /etc/nginx/sites-available/$HOSTNAME
223
+#+END_SRC
224
+
225
+Add the following to the section which starts with *listen 443*
226
+
227
+#+BEGIN_SRC bash
228
+    ssl_certificate /etc/ssl/certs/mydomainname.com.bundle.crt;
229
+#+END_SRC
230
+
231
+Save and exit, then restart the web server.
232
+
233
+#+BEGIN_SRC bash
234
+service nginx restart
235
+#+END_SRC
236
+
237
+Now visit your web site at https://mydomainname.com and you should notice that there is no certificate warning displayed.  You will now be able to install systems which don't allow the use of self-signed certificates, such as [[https://redmatrix.me/&JS=1][Red Matrix]].
238
+
239
+* Why use self-signed certificates?
240
+Almost everywhere on the web you will read that self-signed certificates are worthless. They bring up scary looking browser warnings and gurus will advise you not to use them. Self-signed certificates are quite useful though. What the scary warnings mean - and it would be good if they explained this more clearly - is that you have an encrypted connection established but there is /no certainty about who that connection is with/. The usual solution to this is to get a "real" SSL certificate from one of the certificate authorities, but it's far from clear that such authorities can be trusted. There have been various scandals involving such organisations, and it does not seem plausible to assume that they are somehow immune to the sort of treatment which [[http://en.wikipedia.org/wiki/Lavabit][Lavabit]] received. So although most internet users have been trained to look for the lock icon as an indication that the connection is secured that belief may not always be well founded.
241
+
242
+Security of web sites on the internet is still a somewhat unsolved problem, and what we have now is a less than ideal but /good enough to fool most of the people most of the time/ kind of arrangement. Long term a better solution might be to have a number of certificate authorities in a number of different jurisdictions vote on whether a given certificate actually belongs to a given domain name. Experimental systems like this exist, but they're not widely used. Since the current certificate system has an enormous amount of inertia behind it change could be slow in arriving.
243
+
244
+For now a self-signed certificate will probably in most cases protect your communications from "bulk" passive surveillance. Once you've got past the scary browser warning and accepted the certificate under most conditions (except when starting up the Tor browser) you should not repeatedly see that warning. If you do then someone may be trying to meddle with your connection to the server. You can also take a note of the fingerprint of the certificate and verify that if you are especially concerned. If the fingerprint remains the same then you're probably ok.
245
+* Why not use the services of $company instead? They took the Seppuku pledge
246
+[[http://seppuku.cryptostorm.org][That pledge]] is utterly worthless. Years ago people trusted Google in the same sort of way, because they promised not be be evil and because a lot of the engineers working for them seemed like honest types who were "/on our side/". Post-[[https://en.wikipedia.org/wiki/Nymwars][nymwars]] and post-[[https://en.wikipedia.org/wiki/PRISM_%28surveillance_program%29][PRISM]] we know exactly how much Google cared about the privacy and security of its users. But Google is only one particular example. In general don't trust pledges made by companies, even if the people running them seem really sincere.

+ 32
- 0
doc/us/index.org View File

@@ -0,0 +1,32 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+#+BEGIN_CENTER
12
+#+ATTR_HTML: :border -1
13
+| [[./variants.html][Variants]] | [[./installation.html][Installation]] | [[./usage.html][How to use it]] | [[file:backups.html][Backups]] | [[./code.html][Code]] | [[./related.html][Related Projects]] | [[file:faq.html][FAQ]] | [[file:support.html][Support]] | [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][License]] |
14
+#+END_CENTER
15
+
16
+Freedombone is a self-hosted home server configuration which can be installed onto any computer capable of running Debian Jessie. If you have an old laptop or netbook which you can leave turned on then you can use Freedombone to provide your own internet services, such as blogging, wiki, email, chat and social networking and have independence from the well known internet companies.
17
+
18
+#+BEGIN_QUOTE
19
+"With the increasing move of our computing to cloud infrastructures, we give up the control of our computing to the managers of those infrastructures. Our terminals (laptops, desktops) might now be running entirely on Free Software, but this is increasingly irrelevant given that most of what actually matters gets executed on a remote closed system that we don’t control. The Free Software community needs to work to help users keep the control of all their computing, by developing suitable alternatives and facilitating their deployment." -- Lucas Nussbaum
20
+#+END_QUOTE
21
+
22
+Today everyone is concerned about privacy on the internet.  At the same time there's a problem with the companies who have traditionally provided most of the web services. The people running those companies may be well-intentioned - as in the famous motto "/don't be evil/" - but the advertising based business model which currently dominates, combined with an increasing level of political pressure to insert backdoors means that it is usually impossible for companies operating within both their own business models and the framework of national laws to provide you with services which don't intentionally leak your private communications to advertisers, insurers or governments.
23
+
24
+Another problem is the precariousness of the terms of service. Except in rare cases such terms are not easy to read, so many people end up clicking through terms which if explained more clearly they would never agree to. Over the past decade many internet users have had the unpleasant experience of having their blogs, videos or other web content inexplicably removed, typically due to some ill-defined terms of service violation or a false accusation of copyright infringement.
25
+
26
+You can bypass all of these dilemmas and take back ownership of your internet content with Freedombone.  Originally based upon the Beaglebone Black, Freedombone is a small and cheap home server which enables you to use email, have your own web site and do social networking without any built-in spying and without having to agree to any legal terms of service other than those of your ISP.  It provides independence and security in an era where those things are in short supply.
27
+
28
+#+BEGIN_CENTER
29
+[[file:images/surveillance.png]]
30
+#+END_CENTER
31
+
32
+An emphasis of the Freedombone project is the protection of private communications from indiscriminate mass surveillance, otherwise known as "/bulk intercept/" or "/warrantless wiretapping/". With only a few exceptions data entering and leaving the system is encrypted using settings recommended by [[https://bettercrypto.org][bettercrypto.org]]. Stored emails are encrypted such that only someone knowing your GPG password can read them and a GPG key is created automatically if you don't already have one. The system is firewalled with only the necessary ports being opened. Exclusively [[http://en.wikipedia.org/wiki/Free_software][free software]] is used so that all of it can potentially be security audited and proprietary repositaries are disabled by default. There are still numerous security problems with the internet in general and software always contains bugs, but a best attempt has been made to ensure that the Freedombone is at least more secure than average. A limitation is that this system will not protect you from metadata analysis, although it is hoped that new types of email system may be able to do that in future.

+ 184
- 0
doc/us/installation.org View File

@@ -0,0 +1,184 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+| [[file:index.html][Home]] | [[Preparation for the Beaglebone Black]] | [[Checklist]] | [[GPG Keys]] | [[Interactive Setup]] | [[Non-Interactive Setup]] | [[Post-Setup]] | [[On Client Machines]] |
11
+
12
+
13
+* Preparation for the Beaglebone Black
14
+This section is specific to the Beaglebone Black hardware. If you're not using that hardware then just skip to the next section.
15
+
16
+To get started you will need:
17
+
18
+ - A Beaglebone Black
19
+ - A MicroSD card
20
+ - Ethernet cable
21
+ - Optionally a 5V 2A power supply for the Beaglebone Black
22
+ - Access to the internet via a router with ethernet sockets
23
+ - USB thumb drive (for backups or storing media)
24
+ - One or more domains available via a dynamic DNS provider, such as https://freedns.afraid.org
25
+ - A purchased domain name and SSL certificate (only needed for Red Matrix)
26
+ - A laptop or desktop machine with the ability to write to a microSD card (might need an adaptor)
27
+
28
+You will also need to know, or find out, the IP address of your internet router and have a suitable static IP address for the Beaglebone on your local network. The router should allow you to forward ports to the Beaglebone (often this is under firewall or "advanced" settings).
29
+
30
+You can either install from a debian package or manually as follows:
31
+
32
+#+BEGIN_SRC bash
33
+sudo apt-get update
34
+sudo apt-get install git dialog build-essential
35
+git clone https://github.com/bashrc/freedombone
36
+cd freedombone
37
+sudo make install
38
+#+END_SRC
39
+
40
+Plug the microSD card into your laptop/desktop and then run the *freedombone-prep* command. For example:
41
+
42
+#+BEGIN_SRC bash
43
+freedombone-prep -d /dev/sdX --ip freedombone_IP_address --iprouter router_IP_address
44
+#+END_SRC
45
+
46
+where /dev/sdX is the device name for the microSD card. Often it's /dev/sdb or /dev/sdc, depending upon how many drives there are on your system. The script will download the Debian installer and update the microSD card. It can take a while, so be patient.
47
+
48
+When the initial setup is done follow the instructions on screen to run the main freedombone command.
49
+
50
+* Checklist
51
+Before running the freedombone command you will need a few things.
52
+
53
+  * Have some domains, or subdomains, registered with a dynamic DNS service
54
+  * System with a new installation of Debian Jessie
55
+  * Ethernet connection to an internet router
56
+  * It is possible to forward ports from the internet router to the system
57
+  * If you want to set up a social network or microblog then you will need SSL certificates corresponding to those domains
58
+  * Have ssh access to the system
59
+
60
+* GPG Keys
61
+If you have existing GPG keys then copy the .gnupg directory onto the system.
62
+
63
+#+BEGIN_SRC bash
64
+scp -r ~/.gnupg username@freedombone_IP_address:/home/username
65
+#+END_SRC
66
+
67
+* Interactive Setup
68
+The interactive server configuration setup is recommended for most users. On the system where freedombone is to be installed create a configuration file.
69
+
70
+#+BEGIN_SRC bash
71
+ssh username@freedombone_IP_address
72
+su
73
+sudo apt-get update
74
+apt-get install git dialog build-essential
75
+git clone https://github.com/bashrc/freedombone
76
+cd freedombone
77
+make install
78
+#+END_SRC
79
+
80
+Now the easiest way to install the system is via the interactive setup.
81
+
82
+#+BEGIN_SRC bash
83
+freedombone menuconfig
84
+#+END_SRC
85
+
86
+You can select which variant you wish to install and then enter the details as requested. A video of the install sequence can be [[./installer.ogv][seen here]].
87
+
88
+* Non-Interactive Setup
89
+If you don't want to install interactively then it's possible to manually create a configuration file as follows:
90
+
91
+On the system where freedombone is to be installed create a configuration file.
92
+
93
+#+BEGIN_SRC bash
94
+ssh username@freedombone_IP_address
95
+su
96
+sudo apt-get update
97
+apt-get install git build-essential
98
+git clone https://github.com/bashrc/freedombone
99
+cd freedombone
100
+make install
101
+nano /home/username/freedombone/freedombone.cfg
102
+#+END_SRC
103
+
104
+Add the following, and set the values as needed.
105
+
106
+#+BEGIN_SRC bash
107
+MY_EMAIL_ADDRESS=
108
+MY_NAME=
109
+MY_BLOG_TITLE=
110
+MY_BLOG_SUBTITLE=
111
+FULLBLOG_DOMAIN_NAME=
112
+MICROBLOG_DOMAIN_NAME=
113
+REDMATRIX_DOMAIN_NAME=
114
+OWNCLOUD_DOMAIN_NAME=
115
+WIKI_DOMAIN_NAME=
116
+WIKI_TITLE=
117
+ENABLE_CJDNS=no
118
+LOCAL_NETWORK_STATIC_IP_ADDRESS=
119
+ROUTER_IP_ADDRESS=
120
+#+END_SRC
121
+
122
+Both of the IP addresses are local IP addresses, typically of the form 192.168.x.x, with one being for the system and the other being for the internet router.
123
+
124
+Save the configuration file and exit from your editor.
125
+
126
+Now you can begin the installation. If you are doing this on a Beaglebone Black:
127
+
128
+#+BEGIN_SRC bash
129
+freedombone --bbb -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
130
+#+END_SRC
131
+
132
+Or on any other system don't include the *--bbb* option.
133
+
134
+#+BEGIN_SRC bash
135
+freedombone -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
136
+#+END_SRC
137
+
138
+The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki.
139
+
140
+Also see the manpage for additional options which can be used instead of a configuration file. If you don't specify a variant type with the final option then everything will be installed. If you have a *freedombone.cfg* file then it should be in the same directory from which the *freedombone* command is run.
141
+
142
+* Post-Setup
143
+Setup of the server and installation of all the relevant packages is not quick, and depends upon which variant you choose and your internet bandwidth. Allow about three hours for a full installation on the Beaglebone Black. On the Beaglebone installation is in two parts, since a reboot is needed to enable the hardware random number generator and zram.
144
+
145
+When done you can ssh into the Freedombone with:
146
+
147
+#+BEGIN_SRC bash
148
+ssh username@domain -p 2222
149
+#+END_SRC
150
+
151
+Any manual post-installation setup instructions or passwords can be found in /home/username/README. You should remove any passwords from that file and store them within a password manager such as KeepassX.
152
+
153
+On your internet router, typically under firewall settings, open the following ports and forward them to your server.
154
+
155
+| Service |      Ports |
156
+|---------+------------|
157
+| HTTP    |         80 |
158
+| HTTPS   |        443 |
159
+| SSH     |       2222 |
160
+| DLNA    |       1900 |
161
+| DLNA    |       8200 |
162
+| XMPP    | 5222..5223 |
163
+| XMPP    |       5269 |
164
+| XMPP    | 5280..5281 |
165
+| IRC     |       6697 |
166
+| IRC     |       9999 |
167
+| Git     |       9418 |
168
+| Email   |         25 |
169
+| Email   |        587 |
170
+| Email   |        465 |
171
+| Email   |        993 |
172
+| VoIP    |      64738 |
173
+
174
+* On Client Machines
175
+You can configure laptops or desktop machines which connect to the Freedombone server in the following way. This alters encryption settings to improve overall security.
176
+
177
+#+BEGIN_SRC bash
178
+sudo apt-get update
179
+sudo apt-get install git dialog haveged build-essential
180
+git clone https://github.com/bashrc/freedombone
181
+cd freedombone
182
+sudo make install
183
+freedombone-client
184
+#+END_SRC

+ 36
- 0
doc/us/related.org View File

@@ -0,0 +1,36 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+| [[file:index.html][Home]] |
12
+
13
+#+BEGIN_CENTER
14
+The following projects made Freedombone possible.
15
+#+END_CENTER
16
+
17
+#+BEGIN_CENTER
18
+[[http://wiki.nginx.org][file:images/nginx.png]]
19
+[[https://www.openssl.org][file:images/openssl.png]]
20
+#+END_CENTER
21
+#+BEGIN_CENTER
22
+[[https://www.gnupg.org][file:images/gnupg.png]]
23
+[[https://www.debian.org/][file:images/debian.png]]
24
+[[http://freedomboxfoundation.org/][file:images/freedombox.png]]
25
+[[http://beagleboard.org/products/beaglebone+black][file:images/beagleboard.png]]
26
+[[https://www.dokuwiki.org/dokuwiki][file:images/dokuwiki.png]]
27
+#+END_CENTER
28
+#+BEGIN_CENTER
29
+[[http://gnu.io][file:images/gnusocial.png]]
30
+[[https://redmatrix.me/][file:images/redmatrix.png]]
31
+#+END_CENTER
32
+#+BEGIN_CENTER
33
+[[https://prosody.im][file:images/prosody.png]]
34
+[[http://owncloud.org][file:images/owncloud.png]]
35
+[[https://bettercrypto.org/][file:images/bettercrypto.png]]
36
+#+END_CENTER

+ 39
- 0
doc/us/support.org View File

@@ -0,0 +1,39 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+You can support the Freedombone project with the following banner ads. Download an image and add it to your site or blog with a link to [[http://freedombone.uk.to][http://freedombone.uk.to]]. If you're using [[https://addons.mozilla.org/en-us/firefox/addon/adblock-edge/][AdBlock]] then you may need to disable it on this page to see the images below.
12
+
13
+#+BEGIN_CENTER
14
+[[./ads/freedombone_ad7.jpg]]
15
+#+END_CENTER
16
+
17
+#+BEGIN_CENTER
18
+[[./ads/freedombone_ad1.jpg]]
19
+#+END_CENTER
20
+
21
+#+BEGIN_CENTER
22
+[[./ads/freedombone_ad2.jpg]]
23
+#+END_CENTER
24
+
25
+#+BEGIN_CENTER
26
+[[./ads/freedombone_ad3.jpg]]
27
+#+END_CENTER
28
+
29
+#+BEGIN_CENTER
30
+[[./ads/freedombone_ad4.jpg]]
31
+#+END_CENTER
32
+
33
+#+BEGIN_CENTER
34
+[[./ads/freedombone_ad5.jpg]]
35
+#+END_CENTER
36
+
37
+#+BEGIN_CENTER
38
+[[./ads/freedombone_ad6.jpg]]
39
+#+END_CENTER

+ 463
- 0
doc/us/usage.org View File

@@ -0,0 +1,463 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+| [[file:index.html][Home]] | [[Readme]] | [[Using Email]] | [[Mailing List]] | [[Syncing to the Cloud]] | [[Play Music]] | [[Microblogging]] | [[Social Network]] | [[Chat Services]] |
12
+
13
+* Readme
14
+After the system has installed a README file will be generated which contains passwords and some brief advice on using the installed systems. You can read this with the following commands:
15
+
16
+#+BEGIN_SRC bash
17
+ssh username@domainname -p 2222
18
+emacs ~/README
19
+#+END_SRC
20
+
21
+You should transfer any passwords to a password manager such as [[http://www.keepassx.org/][KeepassX]] and then delete them from the README file. To save the file after removing passwords use *CTRL-x CTRL-s*.
22
+
23
+To exit you can either just close the terminal or use *CTRL-x CTRL-c* followed by the *exit* command.
24
+* Improving ssh security
25
+To improve ssh security you can generate an ssh key pair on your system and then upload the public key to the Freedombone.
26
+
27
+On your local machine:
28
+
29
+#+BEGIN_SRC bash
30
+ssh-keygen
31
+#+END_SRC
32
+
33
+For extra security you may also want to add a passphrase to the ssh private key. You can show the generated public key with:
34
+
35
+#+BEGIN_SRC bash
36
+cat ~/.ssh/id_rsa.pub
37
+#+END_SRC
38
+
39
+Copy the contents of *~/.ssh/id_rsa* and *~/.ssh/id_rsa.pub* to you password manager, together with the private key password if you created one.
40
+
41
+ssh to the Freedombone and edit the authorized keys:
42
+
43
+#+BEGIN_SRC bash
44
+ssh username@domain -p 2222
45
+emacs ~/.ssh/authorized_keys
46
+#+END_SRC
47
+
48
+Now copy and paste the contents of *id_rsa.pub* into the authorized_keys file. Save the file and exit. Open another terminal window and try logging in again and you should notice that you are no longer asked for a password, because the ssh key is used instead.
49
+
50
+There are advantages and disadvantages to using ssh keys for logins. The advantage is that this is much more secure than a memorised password, but the disadvantage is that you need to carry your ssh keys around and be able to install them on any computer of mobile device that you use. In high security or hostile infosec environments it may not be possible to carry or use USB thumb drives containing your keys and so memorised passwords may be the only available choice.
51
+
52
+If you wish to only use ssh keys then log in to the Freedombone and edit */etc/ssh/sshd_config*, then change *PasswordAuthentication* to "no", save and run *service ssh restart*. Any subsequent attempts to log in via a password will then be denied.
53
+
54
+* Using Email
55
+** A technical note about email transport security
56
+Port 465 is used for SMTP and this is supposedly deprecated for secure email. However, using TLS from the start of the communications seems far more secure than starting off with insecure communications and then trying to upgrade it with a command to begin TLS, as happens with STARTTLS. There are [[https://www.eff.org/deeplinks/2014/11/starttls-downgrade-attacks][possible attacks against STARTTLS]] in which the command to begin secure communications is removed or overwritten which could then result in email being transferred in plain text over the internet and be readable by third parties.
57
+** Add a password to your GPG key
58
+If you didn't use existing GPG keys during the Freedombone installation then you'll need to add a password to your newly generated private key. This is highly recommended. Go through the following sequence of commands to ssh into the Freedombone and then change your GPG password.
59
+
60
+#+BEGIN_SRC bash
61
+ssh username@domainname -p 2222
62
+gpg --edit-key username@domain
63
+passwd
64
+save
65
+quit
66
+exit
67
+#+END_SRC
68
+
69
+Having a password on your GPG key will prevent someone from reading your email /even if your server gets lost or stolen/ or if someone else has physical access to it. Make the password something long and unlikely to be guessable or vulnerable to a brute force [[http://en.wikipedia.org/wiki/Dictionary_attack][dictionary attack]].
70
+
71
+** Publishing your GPG public key
72
+If you havn't already then you should publish your GPG public key so that others can find it.
73
+
74
+#+BEGIN_SRC bash
75
+ssh username@domainname -p 2222
76
+gpg --send-keys username@domainname
77
+exit
78
+#+END_SRC
79
+** Mutt email client
80
+Mutt is a terminal based email client which comes already installed onto the Freedombone. To access it you'll need to access it via ssh with:
81
+
82
+#+BEGIN_SRC bash
83
+ssh username@domainname -p 2222
84
+#+END_SRC
85
+
86
+If you're using Windows there is an ssh client called putty, on Linux just open a terminal and enter the above command with your username and domain name. On Android you can use the ConnectBot app with the hostname *username@domain:2222*
87
+
88
+Once you have logged in via ssh then just type *mutt*. Like most terminal programs mutt is quite easy once you've learned the main keys.
89
+
90
+Some useful keys to know are:
91
+
92
+| "/"    | Search for text within headers                          |
93
+| *      | Move to the last message                                |
94
+| TAB    | Move to the next unread message                         |
95
+| d      | Delete a message                                        |
96
+| u      | Undelete a mail which is pending deletion               |
97
+| $      | Delete all messages selected and check for new messages |
98
+| a      | Add to the address book                                 |
99
+| m      | Send a new mail                                         |
100
+| ESC-m  | Mark all messages as having been read                   |
101
+| S      | Mark a message as spam                                  |
102
+| H      | Mark a message as ham                                   |
103
+| CTRL-b | Toggle side bar on/off                                  |
104
+| CTRL-n | Next mailbox (on side bar)                              |
105
+| CTRL-p | Previous mailbox (on side bar)                          |
106
+| CTRL-o | Open mailbox (on side bar)                              |
107
+| ]      | Expand or collapse all threads                          |
108
+| [      | Expand of collapse the current thread                   |
109
+| CTRL-k | Import a PGP/GPG public key                             |
110
+| q      | Quit                                                    |
111
+
112
+To use the address book system open an email by pressing the enter key on it and then to add the sender to the address list press the A key.  It will ask you for an alias which may be used the next time you want to send a mail.  Alternatively you may just edit the *~/.mutt-alias* file directly to add email addresses.
113
+
114
+One of the most common things which you might wish to do is to send an email.  To do this first press /m/ to create a new message.  Enter the address to send to and the subject, then after a few seconds the Emacs editor will appear with a blank document.  Type your email then press /CTRL-x CTRL-s/ to save it and /CTRL-x CTRL-c/ to exit.  You will then see a summary of the email to be sent out.  Press /y/ to send it and then enter your GPG key passphrase (the one you gave when creating a PGP/GPG key).  The purpose of that is to add a signature which is a strong proof that the email was written by you and not by someone else.
115
+
116
+When reading emails you will initially need to enter your GPG password. It will be retained in RAM for a while afterwards.
117
+
118
+** Thunderbird
119
+Another common way in which you may want to access email is via Thunderbird.  This may be especially useful if you're trying to convert former Windows users who may previously have been using some version of Outlook.
120
+
121
+The following instructions should be carried out on the client machines (laptop, etc), not on the BBB itself.
122
+
123
+*** Initial setup
124
+
125
+Install *Thunderbird* and *Enigmail*.  How you do this just depends upon your distro and software manager or "app store".
126
+
127
+Open Thinderbird
128
+
129
+Select "*Skip this and use existing email*"
130
+
131
+Enter your name, email address (myusername@mydomainname.com) and the password for your user (the one from [[Add a user]]).
132
+
133
+You'll get a message saying "/Thunderbird failed to find the settings/"
134
+
135
+The settings should be as follows, substituting /mydomainname.com/ for your domain name and /myusername/ for the username given previously in [[Add a user]].
136
+
137
+  * Incoming: IMAP, mydomainname.com, 993, SSL/TLS, Normal Password
138
+  * Outgoing: SMTP, mydomainname.com, 465, SSL/TLS, Normal Password
139
+  * Username: myusername
140
+
141
+Click *Done*.
142
+
143
+Click *Get Certificate* and make sure "*permanently store this exception*" is selected", then click *Store Security Exception*.
144
+
145
+From OpenPGP setup select "*Yes, I would like the wizard to get me started*".  If the wizard doesn't start automatically then "setup wizard" can be selected from OpenPGP on the menu bar.
146
+
147
+Select "*Yes, I want to sign all of my email*"
148
+
149
+Select "*No, I will create per-recipient rules*"
150
+
151
+Select "*yes*" to change default settings.
152
+*** Import your GPG keys
153
+On the Freedombone export your GPG public and private keys.
154
+
155
+#+BEGIN_SRC bash
156
+ssh username@domainname -p 2222
157
+gpg --list-keys username@domainname
158
+gpg --output ~/public_key.gpg --armor --export KEY_ID
159
+gpg --output ~/private_key.gpg --armor --export-secret-key KEY_ID
160
+#+END_SRC
161
+
162
+On your laptop or desktop you can import the keys with:
163
+
164
+#+BEGIN_SRC bash
165
+scp -P 2222 username@domain:/home/username/*.gpg ~/
166
+#+END_SRC
167
+
168
+Select "*I have existing public and private keys*".
169
+
170
+Select your public and private GPG exported key files.
171
+
172
+Select the account which you want to use and click *Next*, *Next* and *Finish*.
173
+
174
+Remove your exported key files, both on your laptop/desktop and also on the Freedombone.
175
+
176
+#+BEGIN_SRC bash
177
+shred -zu ~/public_key.gpg
178
+shred -zu ~/private_key.gpg
179
+#+END_SRC
180
+
181
+*** Using for the first time
182
+
183
+Click on the Thunderbird menu, which looks like three horizontal bars on the right hand side.
184
+
185
+Hover over *preferences* and then *Account settings*.
186
+
187
+Select *OpenPGP Security* and make sure that *use PGP/MIME by default* is ticked. This will enable you to sign/encrypt attachments, HTML bodies and UTF-8 without any problems.
188
+
189
+Select *Synchronization & Storage*.
190
+
191
+Make sure that *Keep messages for this account on this computer* is unticked, then click *Ok*.
192
+
193
+Click on *Inbox*.  Depending upon how much email you have it may take a while to import the subject lines.
194
+
195
+Note that when sending an email for the first time you will also need to accept the SSL certificate.
196
+
197
+Get into the habit of using email encryption and encourage others to do so.  Remember that you may not think that your emails are very interesting but the Surveillance State is highly interested in them and will be actively trying to data mine your private life looking for "suspicious" patterns, regardless of whether you are guilty of any crime or not.
198
+
199
+*** Making folders visible
200
+By default you won't be able to see any folders which you may have created earlier using the /mailinglistrule/ script.  To make folders visible select:
201
+
202
+*Menu*, hover over *Preferences*, select *Account Settings*, select *Server Settings* then click on the *Advanced* button.
203
+
204
+Make sure that "*show only subscribed folders*" is not checked.  Then click the *ok* buttons.  Folders will be re-scanned, which may take some time depending upon how much email you have, but your folders will then appear.
205
+
206
+** K9 Android client
207
+*NOTE*: Currently the K9 email client will not work with the Freedombone since it doesn't support PGP/MIME encoding. However, there is development work taking place on that feature and it is hoped that K9 may be usable in the near future.
208
+
209
+*** Incoming server settings
210
+ * Select settings/account settings
211
+ * Select Fetching mail/incoming server
212
+ * Enter your username and password
213
+ * IMAP server should be your domain name
214
+ * Security: SSL/TLS (always)
215
+ * Authentication: Plain
216
+ * Port: 993
217
+*** Outgoing (SMTP) server settings
218
+ * Select settings/account settings
219
+ * Select Sending mail/outgoing server
220
+ * Set SMTP server to your domain name
221
+ * Set Security to SSL/TLS (always)
222
+ * Set port to 465
223
+ * Set authentication to PLAIN
224
+ * Enter your username and password
225
+ * Accept the SSL certificate
226
+*** Folders
227
+To view any new folders which you may have created using the /mailinglistrule/ script from your inbox press the *K9 icon* at the top left to access folders, then press the *menu button* and select *refresh folder list*.
228
+
229
+If your folder still doesn't show up then press the *menu button*, select *show folders* and select *all folders*.
230
+
231
+** Subscribing to mailing lists
232
+To subscribe to a mailing list so that it appears within Mutt or Thunderbird.
233
+
234
+#+BEGIN_SRC bash
235
+ssh username@domainname -p 2222
236
+addmailinglist <username> <mailinglistname> <subjecttag>
237
+exit
238
+#+END_SRC
239
+
240
+The subject tag should be the word or phrase which appears within the brackets in the subject line of emails from the mailing list. The mailing list name should be something short so that it is readable within the left side column of the mutt email client.
241
+** Adding email addresses to a group/folder
242
+Similar to adding mailing list folders you can also add specified email addresses into a folder.
243
+
244
+#+BEGIN_SRC bash
245
+ssh username@domainname -p 2222
246
+addemailtofolder <username> <emailaddress> <mailinglistname>
247
+exit
248
+#+END_SRC
249
+
250
+The mailing list name should be something short so that it is readable within the left side column of the mutt email client.
251
+
252
+* Mailing List
253
+If you want to set up a public mailing list then when installing the system remember to set the *PUBLIC_MAILING_LIST* variable within *freedombone.cfg* to the name of your list. The name should have no spaces in it. Public mailing lists are unencrypted so anyone will be able to read the contents, including non subscribers.
254
+
255
+To subscribe to your list send a cleartext email to:
256
+
257
+#+BEGIN_SRC bash
258
+mymailinglistname+subscribe@domainname
259
+#+END_SRC
260
+
261
+Tip: When using the Mutt email client if you want to send an email in cleartext then press *p* (for PGP) on the sending screen and select *clear*. Unsecure email is treated as being the exception rather than the default.
262
+* Syncing to the Cloud
263
+** Initial install
264
+Within a browser go to your owncloud domain, then create an administrator account. The username and password can be anything, and ideally should be generated from a password manager.
265
+
266
+You will also need to enter database details:
267
+
268
+| Owncloud database user     | owncloudadmin       |
269
+| Owncloud database password | See the [[Readme]] file |
270
+| Owncloud database name     | owncloud            |
271
+
272
+After creating an administrator account then create a user account via the Users dropdown menu entry on the right hand side and log the details in a password manager. Give the user a quota suitable for the size of your microSD card or other storage.
273
+
274
+Log out from the administrator account and then log back in as the user you just created.
275
+** On Android
276
+Within F-droid search for *owncloud* and install the client. Also install *CalDAV Sync Adapter*.
277
+
278
+Open the owncloud app and enter your owncloud domain name (including the https prefix) and login details for the user you created.
279
+
280
+Open the calendar app and under *settings* add a CalDav account with the url:
281
+
282
+#+BEGIN_SRC bash
283
+https://myownclouddomain/remote.php/caldav/principals/myowncloudusername
284
+#+END_SRC
285
+
286
+You will also be prompted to enter login details. Your Android and Owncloud calendars should now be synchronised.
287
+** On Linux
288
+Open your software center and search for "owncloud client". Enter your owncloud domain name (with the https prefix) and login details.
289
+
290
+You can now drag files into the *~/owncloud* directory and they will automatically sync to your server. It's that easy.
291
+* Play Music
292
+** With the DLNA service
293
+An easy way to play music on any mobile device in your home is to use the DLNA service. Copy your music into a directory called "/Music/" on a USB thumb drive and then insert it into from socket on the Beaglebone.
294
+
295
+ssh into the system with:
296
+
297
+#+BEGIN_SRC bash
298
+ssh myusername@mydomain.com -p 2222
299
+#+END_SRC
300
+
301
+Then mount the USB drive with:
302
+
303
+#+BEGIN_SRC bash
304
+su
305
+attach-music
306
+#+END_SRC
307
+
308
+The system will scan the Music directory, which could take a while if there are thousands of files, but you don't need to do anything further with the Beaglebone other than perhaps to log out by typing *exit* a couple of times.
309
+
310
+If you have an Android device then go to F-Droid (if you don't already have it installed then it can be [[https://f-droid.org/][downloaded here]]) and search for *ControlDLNA*. On running the app you should see a red Debian icon which you can press on, then you may need to select "local". After a few seconds the list of albums or tracks should then appear and you can browse and play them.
311
+
312
+The DLNA service will only work within your local home network, and isn't remotely accessible from other locations via the internet. That can be both a good and a bad thing. Another consideration is that there are no access controls on DLNA services, so any music or videos on the USB drive will be playable by anyone within your home network. If you need to restrict access to certain files then it may be better to use the music player within Owncloud.
313
+
314
+** With Owncloud
315
+The main advantage of playing music via Owncloud is that you can do that from anywhere - not only within your home network.
316
+
317
+By default a music player is installed into Owncloud, so all you need to do is to visit your Owncloud web site, select the *music* directory and then upload some music files. Afterwards you can select the *music icon* from the top left drop down menu and albums will then appear which can be played. If you want to share music with other users then you can select the *share* option from within the files view to make the tracks available.
318
+
319
+* Microblogging
320
+** Initial configuration
321
+To set up your microblog go to:
322
+
323
+#+BEGIN_SRC bash
324
+https://yourmicroblogdomainname/install.php
325
+#+END_SRC
326
+
327
+and enter the following settings:
328
+
329
+| Server SSL                 | enable                                      |
330
+| Hostname                   | localhost                                   |
331
+| Type                       | MySql/MariaDB                               |
332
+| Name                       | gnusocial                                   |
333
+| DB username                | root                                        |
334
+| DB Password                | See the MariaDB password in the [[Readme]] file |
335
+| Administrator nickname     | Your username                               |
336
+| Administrator password     | See the [[Readme]] file                         |
337
+| Subscribe to announcements | ticked                                      |
338
+| Site profile               | Community                                   |
339
+
340
+When the install is complete you will see a lot of warnings but just ignore those and navigate to your microblog domain and you can then complete the configuration via the *Admin* section on the header bar.  Some recommended admin settings are:
341
+
342
+| Site settings   | Text limit 140, Dupe Limit 60000 |
343
+| User settings   | Bio limit 1000                   |
344
+| Access settings | /Invite only/ ticked             |
345
+* Social Network
346
+** Certificates
347
+You will need to have a non self-signed SSL certificate in order to use Red Matrix. Put the public certificate in */etc/ssl/certs/yourredmatrixdomainname.crt* and the private certificate in */etc/ssl/private/yourredmatrixdomainname.key*. If there is an intermediate certificate needed (such as with StartSSL) then this will need to be concatenated onto the end of the crt file, like this:
348
+
349
+#+BEGIN_SRC bash
350
+cat /etc/ssl/certs/yourredmatrixdomainname.crt /etc/ssl/chains/startssl-sub.class1.server.ca.pem >
351
+ /etc/ssl/certs/yourredmatrixdomainname.bundle.crt
352
+#+END_SRC
353
+
354
+Then change ssl_certificate to */etc/ssl/certs/yourredmatrixdomainname.bundle.crt* within */etc/nginx/sites-available/yourredmatrixdomainname*
355
+** Initial install
356
+Visit the URL of your Red Matrix site and you should be taken through the rest of the installation procedure.  Note that this may take a few minutes so don't be concerned if it looks as if it has crashed - just leave it running.
357
+
358
+When installation is complete you can register a new user.
359
+* Chat Services
360
+** IRC
361
+IRC is useful for multi-user chat. The classic use case is for software development where many engineers might need to coordinate their activities, but it's also useful for meetings, parties and general socialising.
362
+*** Irssi
363
+If you are using the [[http://www.irssi.org][irssi]] IRC client then you can use the following commands to connect to your IRC server.
364
+
365
+#+BEGIN_SRC bash
366
+/server add -auto -ssl yourdomainname 6697
367
+/connect yourdomainname
368
+/join freedombone
369
+#+END_SRC
370
+*** XChat
371
+If you are using the XChat client:
372
+
373
+Within the network list click, *Add* and enter your domain name then click *Edit*.
374
+
375
+Select the entry within the servers box, then enter *mydomainname/6697* and press *Enter*.
376
+
377
+Uncheck *use global user information*.
378
+
379
+Enter first and second nicknames and check *auto connect to this network on startup*.
380
+
381
+Check *use SSL* and *accept invalid SSL certificate*.
382
+
383
+Enter *#freedombone* as the channel name.
384
+
385
+Click *close* and then *connect*.
386
+
387
+** XMPP/Jabber
388
+*** Managing users
389
+
390
+To add a user:
391
+
392
+#+BEGIN_SRC bash
393
+ssh username@domainname -p 2222
394
+su
395
+prosodyctl adduser newusername@newdomainname
396
+exit
397
+exit
398
+#+END_SRC
399
+
400
+To change a user password:
401
+
402
+#+BEGIN_SRC bash
403
+ssh username@domainname -p 2222
404
+su
405
+prosodyctl passwd username@domainname
406
+exit
407
+exit
408
+#+END_SRC
409
+
410
+To remove a user:
411
+
412
+#+BEGIN_SRC bash
413
+ssh username@domainname -p 2222
414
+su
415
+prosodyctl deluser username@domainname.com
416
+exit
417
+exit
418
+#+END_SRC
419
+
420
+Report the status of the XMPP server:
421
+
422
+#+BEGIN_SRC bash
423
+ssh username@domainname -p 2222
424
+su
425
+prosodyctl status
426
+exit
427
+exit
428
+#+END_SRC
429
+
430
+*** Using with Jitsi
431
+Jitsi is the recommended communications client for desktop or laptop systems, since it includes the /off the record/ (OTR) feature which provides some additional security beyond the usual SSL certificates.
432
+
433
+Jitsi can be downloaded from https://jitsi.org
434
+
435
+On your desktop/laptop open Jitsi and select *Options* from the *Tools* menu.
436
+
437
+Click *Add* to add a new user, then enter the Jabber ID which you previously specified with /prosodyctl/ when setting up the XMPP server. Close and then you should notice that your status is "Online" (or if not then you should be able to set it to online).
438
+
439
+From the *File* menu you can add contacts, then select the chat icon to begin a chat.  Click on the lock icon on the right hand side and this will initiate an authentication procedure in which you can specify a question and answer to verify the identity of the person you're communicating with.  Once authentication is complete then you'll be chating using OTR, which provides an additional layer of security.
440
+
441
+When opening Jitsi initially you will get a certificate warning for your domain name (assuming that you're using a self-signed certificate). If this happens then select *View Certificate* and enable the checkbox to trust the certificate, then select *Continue Anyway*.  Once you've done this then the certificate warning will not appear again unless you reinstall Jitsi or use a different computer.
442
+
443
+You can also [[https://www.youtube.com/watch?v=vgx7VSrDGjk][see this video]] as an example of using OTR.
444
+*** Using with Ubuntu
445
+The default XMPP client in Ubuntu is Empathy.  Using Empathy isn't as secure as using Jitsi, since it doesn't include the /off the record/ feature, but since it's the default it's what many users will have easy access to.
446
+
447
+Open *System Settings* and select *Online Accounts*, *Add account*  and then *Jabber*.
448
+
449
+Enter your username (username@domainname) and password.
450
+
451
+Click on *Advanced* and make sure that *Encryption required* and *Ignore SSL certificate errors* are checked.  Ignoring the certificate errors will allow you to use the self-signed certificate created earlier.  Then click *Done* and set your Jabber account and Empathy to *On*.
452
+*** Using with Android
453
+Install [[https://f-droid.org/][F-Droid]]
454
+
455
+Search for and install Xabber.
456
+
457
+Add an account and enter your Jabber/XMPP ID and password.
458
+
459
+From the menu select *Settings* then *Security* then *OTR mode*.  Set the mode to *Required*.
460
+
461
+Make sure that *Check server certificate* is not checked.
462
+
463
+Go back to the initial screen and then using the menu you can add contacts and begin chatting.  Both parties will need to go through the off-the-record question and answer verification before the chat can begin, but that only needs to be done once for each person you're chatting with.

+ 21
- 0
doc/us/variants.org View File

@@ -0,0 +1,21 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+| [[file:index.html][Home]] |
12
+
13
+Freedombone may be installed either in its entirety or as different variants with a more specialised purpose.  So for example if you just want to run a blog but don't care about any other services then you can do that. The following variants are available:
14
+
15
+| *Mailbox*    | An email server with GPG encryption and mailing list                     |
16
+| *Cloud*      | Share files, maintain a calendar and collaborate on document editing     |
17
+| *Social*     | Social networking with Red Matrix and GNU Social                         |
18
+| *Media*      | Runs media services such as DLNA to play music or videos on your devices |
19
+| *Writer*     | Host your blog and wiki                                                  |
20
+| *Chat*       | Encrypted IRC and XMPP services for one-to-one and many-to-many chat     |
21
+| *Nonmailbox* | Installs eveything except for the email server                           |