* A SATA Cable and a SATA-PWR cable, the SATAP-PWR cable needs a JST connector on one end. This can be easily DIY'd or purchased [via the Olimex website](https://www.olimex.com/Products/Components/Cables/SATA-CABLE-SET/)
* Powersupply that is able to feed both (5v, 1.2Ah).
Title: HBSC Basics: setting up Port Forwarding on your home router
Title: Setting up port forwarding on your home router
Date: 2019-01-14
Tags: port forwarding, router, introduction, lan, wan
Slug: basics-port-forwarding
Tags: port-forwarding, router
Slug: port-forwarding
Description: How to set up a spare computer as a server and make it reachable over the internet.
Author: hbsc & friends
Status: draft
# UNDER CONSTRUCTION
@ -28,7 +28,7 @@ To begin serving from home you need the following:
## Port forwarding theory
![A schematic representation depicting network address translation between a LAN and WAN](images/port_forwarding.svg) A schematic representation depicting network address translation between a local area network and a wide area network, where ports are being forwarded from the WAN to home server on the LAN. The IP-addresses indicated in this schematic are used throught the article as for reference but might differ from your own situation.
![A schematic representation depicting network address translation between a LAN and WAN](images/port-forwarding/port_forwarding.svg) A schematic representation depicting network address translation between a local area network and a wide area network, where ports are being forwarded from the WAN to home server on the LAN. The IP-addresses indicated in this schematic are used throught the article as for reference but might differ from your own situation.
Most home routers are configured by default to make the devices behind your router inaccessible to the internet using their inbuilt firewall. This is to prevent your private network from being public.
@ -90,10 +90,6 @@ Next try to find an option called "Static (DHCP) Lease" or "DHCP Binding" or som
Once you've set up a static lease to your homeserver you can start port forwarding. Depending on the make of the router it can be called Port Sharing or Traffic Forwarding and can usually be found in a section of the router admin interface dealing with 'security' or 'internet'.
## Additional Resources
* [https://portforward.com/](https://portforward.com/router.htm) has a large list of routers and visual instructions on how to set up port forwarding on them.
OMEMO is an extension to XMPP for multi-client end-to-end encryption. OMEMO only works if the fingerprint of your and your friend’s device match. To compare them, open one of your conversations and click on your profile picture next to one of your messages. At the same time, your friend clicks on your icon on his phone.
Now, both of you should see a fingerprint that you can check. If they match, change the slider as you see in the screenshot to the right.
@ -94,22 +94,22 @@ If OMEMO cannot be activated, just send a message in the chat window. This somet
After you activated OMEMO, the input field at the bottom should say you can now send encrypted messages:
![The shield or padlock indicates an encrypted message]({static}images/conv_3.png)
![The shield or padlock indicates an encrypted message](images/xmpp-msgr/conv_3.png)
Troubleshooting Conversations
---
If OMEMO cannot be activated, just send a message in the chat window. This sometimes helps. Also, it may help to end a conversation by pressing the menu on the top right inside a conversation as shown in the following screenshot, and then re-open the conversation again.
![Ending a conversation]({static}images/conv_4.png)
![Ending a conversation](images/xmpp-msgr/conv_4.png)
Allow presence updates, this is used by OMEMO to exchange keys: In a conversation, click on the icon/image of your chat partner. In the new screen (as shown below), make sure that all checkboxes are activated:
![Make sure you allow presence updates so your client can exchange OMEMO keys]({static}images/conv_5.png)
![Make sure you allow presence updates so your client can exchange OMEMO keys](images/xmpp-msgr/conv_5.png)
Check fingerprints: You might be asked to trust fingerprints like this:
If you run into problems try asking for help in the Conversations XMPP groupchat: [conversations@conference.siacs.eu](xmpp:conversations@conference.siacs.eu?join)
@ -124,32 +124,32 @@ Get ChatSecure from the AppStore. `¯\_(ツ)_/¯`
Choose whether to create a new account or login with an existing one:
If you already have an XMPP account, you can log in with your username@hostname and password. After you selected "Add Existing Account" you have the option to connect with "XMPP" or with "Google Talk". Select "XMPP" and fill in your Nickname, Username (username@server.net) and password. Optionally fill in the Hostname of your XMPP server and select if you want to use Tor or not. If you're doubting about the port, 5222 is the default XMPP port and would likely be on your server as well.
**Enabling Push**
![Considering using push]({static}images/cs_4.png)
![Considering using push](images/xmpp-msgr/cs_4.png)
After you've logged in, the app proposes to establishe secure connections by sending an empty message to offline contacts. You have the option to "Enable push" or "skip" this part. iOS typically end the connection when an app runs in the background and requires use of Apple's Push servers to wake up and receive a message. By sending empty messages ChatSecure limits the data being sent to the Apple Cloud's Push Server but obviously still provide their vertically integrated cloud platform with meta-data. Read more about the Push issues [here](https://chatsecure.org/blog/chatsecure-v32-push/) and [here](https://chatsecure.org/blog/fixing-the-xmpp-push-problem/)
In the next screen you can "Share invite" (let people on social media know about the app) or tap the '✓' symbol in the top right corner to continue. This takes you to the general 'Settings' menu.
![Invite others to use ChatSecure]({static}images/cs_5.png) > ![Settings]({static}images/cs_6.png) > ![Logging out]({static}images/cs_7.png)
![Invite others to use ChatSecure](images/xmpp-msgr/cs_5.png) > ![Settings](images/xmpp-msgr/cs_6.png) > ![Logging out](images/xmpp-msgr/cs_7.png)
If you are successfully connected, the word "Connected" appears right under your username. Before you can edit your account settings, you need to log out. To do this, click your account/nickname in the settings menu and select "Log Out".
Choose "Create New Account" and give your preferred nickname. Under "show advanced options" you can customize your username, generate an automatic password, enable TOR (we didn't test it) and select a server where you would like to register your account on. This is the server you will use to communicate with other people's selected servers, and depending on the server settings it will also store your (encrypted) messages. ChatSecure let's you choose between 3 built-in servers options. Default is DuckDuckGo, but when you tap on "DuckDuckGo" the app will take you to the server selection screen where you can choose between DuckDuckGo, Calyxinstitute.org and OTR.im[ref]All three of these servers score poorly on the modern XMPP [compliance test](https://gultsch.de/compliance.html)[/ref], it also offers you the option to select another, custom, server. Here you can fill in the hostname of the XMPP server of a friend.
From the settings menu, tap 'Chats' (top left) to start chatting and adding friends. To add friends tap the 'Compose' icon, top left corner. Then tap "Add Buddy" and fill in your friends username and hostname (username@hostname) or scan their QR code.
@ -162,13 +162,13 @@ If you get a friend request, their nickname will appear in the "Chats" list.
When in a chat, tap the information icon on the top right (i) to change your encryption settings. The information menu displays your current and past verified fingerprints and allows you to specify an encryption method by tapping "Show Advanced Encryption Sett...".
At the time of writing OMEMO works well with other OMEMO clients, images shared over HTTPUpload however are not displayed inline but rather as a URL. If you click that your browser will open it and fail to decrypt the OMEMO encoded image, because it has no notion of your OMEMO fingerprints. So for now the images shared over HTTPUpload have to be shared using plaintext.
ChatSecure implements OMEMO and OTR on a TOFU or “trust on first use" basis. New "buddies" are automatically trusted.
You can also untrust your friends devices/fingerprints by sliding the green "Verified" button and share fingerprints by tapping them and selecting a medium to share your fingerprint over.
@ -231,7 +231,7 @@ And now for OMEMO! There is a package gajim-omemo on Debian Backports. So run:
Next, start Gajim. After Gajim has started, wait some seconds until it requests your permission to install updates:
![Allow Gajim to update itself]({static}images/gajim_1.png)
![Allow Gajim to update itself](images/xmpp-msgr/gajim_1.png)
Allow this. Afterwards, a new window will open that lists all components that can be installed and updated. In this list, activate the checkbox next to the following plugins:
@ -251,7 +251,7 @@ After the update has finished, go to the other tab **Installed**. There, make su
Then, you should see a wizard to setup your XMPP account. Select the option that you already have an account and follow all instructions yourself using the default settings.
After you finished the wizard successfully, Gajim will show your status as **Available**. Congratulations!
@ -259,13 +259,13 @@ Now, let’s send messages to your friends.
To do so, click on the Gajim window and move your mouse to the top of the screen. There, a menu should appear. Go to Actions -> Start chat… . In the new window, add the XMPP ID of your friend and click ok.
![Adding contacts]({static}images/gajim_3.png)
![Adding contacts](images/xmpp-msgr/gajim_3.png)
Go to the main menu again and select **View -> Show offline contacts…** . In the Gajim window, you should see your friend. Right click on the name of your friend and select **Manage contact -> Add to roster.** In the pop up, just click **Add**. Now your friend is permanently added to your list of contacts. Next, right click on your friend and select **Manage contact -> Allow subscription -> Allow contact to see my status**.
Your friend should see a request like this:
![Friend request]({static}images/gajim_4.png)
![Friend request](images/xmpp-msgr/gajim_4.png)
Your friend should click **Authorize**, which enables her to see if you are online or not. Also, this step is necessary for activating the encryption.
@ -273,7 +273,7 @@ Next, make sure that your friend also allows you to see her status.
Now, when you open the chat window to your friend, it should say OMEMO encryption enabled and show a red shield next to the input field, like this:
![Omemo enabled]({static}images/gajim_5.png)
![Omemo enabled](images/xmpp-msgr/gajim_5.png)
If you don’t see the OMEMO encryption enabled — just restart Gajim and have a look again.
@ -290,7 +290,7 @@ She should chose the tab Own devices, while you chose the tab Contact. Now, sele
Finally, all fingerprints should be green like this:
@ -37,21 +37,21 @@ You can find the source code for 'solar', the Pelican theme we developed [here](
One of the main challenges was to reduce the overall size of the website. Particularly to try and reduce the size of each page to something less than 1MB . Since a large part of both the appeal and the weight of the magazine comes from the fact it is richly illustrated, this presented us with a particular challenge.
![Image from the blog showing 19th century telephone switchboard operators, 159.5KB](/images/international-switchboard.jpg)Image from the blog showing 20th century telephone switchboard operators([original source](https://commons.wikimedia.org/wiki/File:Bell_System_switchboard.jpg)), 159.5KB
![Image from the blog showing 19th century telephone switchboard operators, 159.5KB](images/lowtech-solar/international-switchboard.jpg)Image from the blog showing 20th century telephone switchboard operators([original source](https://commons.wikimedia.org/wiki/File:Bell_System_switchboard.jpg)), 159.5KB
In order to reduce the size of the images, without diminishing their role in the design and the blog itself, we reverted to a technique called dithering:
![The same image but dithered with a 3 color palette](/images/international-switchboard3.png)The same image but dithered with a 3 color palette, 36.5KB
![The same image but dithered with a 3 color palette](images/lowtech-solar/international-switchboard3.png)The same image but dithered with a 3 color palette, 36.5KB
This is a technique 'to create the illusion of "color depth" in images with a limited color palette'[^illusion]. It based on the print reproduction technique called [halftoning](https://en.wikipedia.org/wiki/Halftone). Dithering, or digital half-toning[^digitalhalftone], was widely used in video games and pixel art at a time when a limited amount of video memory constrained the available colors. In essence dithering relies on optical illusions to simulate more colors. These optical illusions are broken however by the distinct and visible patterns that the dithering algorithms generate.
![Dithered with a six tone palette](/images/international-switchboard6.png)Dithered with a six tone palette, 76KB
![Dithered with a six tone palette](images/lowtech-solar/international-switchboard6.png)Dithered with a six tone palette, 76KB
As a consequence most of the effort and literature on dithering is around limiting the 'banding' or visual artifacts by employing increasingly complex dithering algorithms[^dithering].
Our design instead celebrates the visible patterns introduced by the technique, this to stress the fact that it is a 'different' website. Coincidentally, the 'Bayesian Ordered Dithering' algorithm that we use not only introduces these distinct visible patterns, but it is also quite a simple and fast algorithm.
![Dithered with an eleven tone color palette](/images/international-switchboard11.png)Dithered with an eleven tone palette, 110KB
![Dithered with an eleven tone color palette](images/lowtech-solar/international-switchboard11.png)Dithered with an eleven tone palette, 110KB
We chose dithering not only for the compression but also for the aesthetic and reading experience. Converting the images to grayscale and then dithering them allows us to scale them in a visually attractive way to 100% of the view port, despite their small sizes. This gives each article a visual consistency and provides the reader with pauses in the long articles.
@ -73,7 +73,7 @@ Increasing the uptime of the server to 99% on solar energy means increasing the
Rather than that we opted for a low-tech approach that accepts being off-line during longer stretches of cloudy weather. However, we wanted to provide the reader with off-line reading options. Our primary method of doing so currently is by providing an [RSS feed containing all the articles and images on the site](https://solar.lowtechmagazine.com/feeds/all.rss.xml). In the future we will explore other means of providing off-line reading of the magazine.
![An image of the built-in feed reader of Firefox showing solar.lowtechmagazine.com's RSS feed](/images/off-line-reading.png) Most browsers preview only the article titles and summaries of the RSS feed. In fact the feed contains the full articles. Once you add the feed to your favorite reader, it will download the full articles that you can read at any given time.
![An image of the built-in feed reader of Firefox showing solar.lowtechmagazine.com's RSS feed](images/lowtech-solar/off-line-reading.png) Most browsers preview only the article titles and summaries of the RSS feed. In fact the feed contains the full articles. Once you add the feed to your favorite reader, it will download the full articles that you can read at any given time.
## Material Server
@ -397,7 +397,7 @@ Without further ado:
# Hardware
![Image of an A20 Olimex SoC board](/images/lime2.png)
![Image of an A20 Olimex SoC board](images/lowtech-solar/lime2.png)
### Server
The server itself is an [Olimex Olinuxino A20 Lime 2](https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/) single board computer.
@ -410,7 +410,7 @@ In addition to the power statistics the power chip can charge and discharge a Li
The server operating system all runs on an SD-card. Not only are these low-powered but also much faster than hard drives. We use high speed Class 10 16GB mirco-sd card. A 16GB card is actually a bit of an overkill considering the operating system is around 1GB and the website a mere 30MB, but considering the price it doesn't make sense to buy any smaller high-performance cards.
A monthly gathering for those who (wish to) host their own online services from home, rather than using commercial and privacy unfriendly alternatives. Together we config and work on our homebrew server setups. These are low-cost, low-power, low-maintenance, high-fun computers through which we can host all of our online necessities and keep them out of the cloud. The club meetings are open for anyone, from more experienced users to interested beginners. During the homebrewserver.club meetings we exchange tips or look into particular topics together. As we gain more knowledge about a topic, we write and publish guides for others to share.
A monthly gathering for those who (wish to) host their own online services from home, rather than using commercial and privacy unfriendly alternatives. Together we config and work on our homebrew server setups. These are low-cost, low-power, low-maintenance, high-fun computers through which we can host all of our online necessities and keep them out of the cloud. The club meetings are open for anyone, from more experienced users to interested beginners. During the homebrewserver.club meetings we exchange tips or look into particular topics together. As we gain more knowledge about a topic, we write and publish guides for others to share.
If you have questions or would like to join check out our [mailinglist](https://we.lurk.org/postorius/lists/hbsc.we.lurk.org/) or join us in our [XMPP chatroom](xmpp:hbsc@muc.lurk.org?join)
Unless otherwise specified, all the material on this website is published under a [Attribution-ShareAlike 4.0 International license](http://creativecommons.org/licenses/by-sa/4.0/).
Unless otherwise specified, all the material on this website is published under a [Attribution-ShareAlike 4.0 International license](http://creativecommons.org/licenses/by-sa/4.0/).