Browse Source

Describe connecting meshes

Bob Mottram 7 years ago
parent
commit
b713a93d7f
3 changed files with 34 additions and 1 deletions
  1. 1
    1
      doc/EN/app_vpn.org
  2. 31
    0
      doc/EN/mesh.org
  3. 2
    0
      src/freedombone-image-mesh

+ 1
- 1
doc/EN/app_vpn.org View File

50
 You will need to ensure that the /openvpn/ and /stunnel/ packages are installed. On an Arch based system:
50
 You will need to ensure that the /openvpn/ and /stunnel/ packages are installed. On an Arch based system:
51
 
51
 
52
 #+begin_src bash
52
 #+begin_src bash
53
-sudp pacman -S openvpn stunnel4
53
+sudo pacman -S openvpn stunnel4
54
 #+end_src
54
 #+end_src
55
 
55
 
56
 Or on a Debian based system:
56
 Or on a Debian based system:

+ 31
- 0
doc/EN/mesh.org View File

232
 If you need to be able to access the internet from the mesh then connect one of the peers to an internet router using an ethernet cable, then reboot it. Other peers in the mesh, including any attached mobile devices, will then be able to access the internet using the ethernet attached peer as a gateway. [[https://en.wikipedia.org/wiki/Freifunk][Freifunk]] works in a similar way.
232
 If you need to be able to access the internet from the mesh then connect one of the peers to an internet router using an ethernet cable, then reboot it. Other peers in the mesh, including any attached mobile devices, will then be able to access the internet using the ethernet attached peer as a gateway. [[https://en.wikipedia.org/wiki/Freifunk][Freifunk]] works in a similar way.
233
 
233
 
234
 After connecting one peer to the internet you may need to reboot other peers in order to update their network configurations.
234
 After connecting one peer to the internet you may need to reboot other peers in order to update their network configurations.
235
+
236
+If for legal reasons you need to connect to the internet via a VPN then openvpn is preinstalled and you can run the command:
237
+
238
+#+begin_src bash
239
+sudo openvpn myclient.ovpn
240
+#+end_src
241
+
242
+Where /myclient.ovpn/ comes from your VPN provider and with the password "/freedombone/".
243
+** Connecting two meshes over the internet via a VPN tunnel
244
+Maybe the internet exists, but you don't care about getting any content from it and just want to use it as a way to connect mesh networks from different geographical locations together. VPN configuration, pem and stunnel files exist within the home directory. Edit the configuration with:
245
+
246
+#+begin_src bash
247
+nano ~/client.ovpn
248
+#+end_src
249
+
250
+Edit the IP address or domain for the mesh that you wish to connect to within the /route/ command:
251
+
252
+#+begin_src bash
253
+route [mesh IP or domain] 255.255.255.255 net_gateway
254
+#+end_src
255
+
256
+Then you can connect to the other mesh with:
257
+
258
+#+begin_src bash
259
+cd /home/fbone
260
+sudo stunnel stunnel-client.conf
261
+sudo openvpn client.ovpn
262
+#+end_src
263
+
264
+Using the password "/freedombone/". From a deep packet inspection point of view the traffic going over the internet will just look like any other TLS connection to a server.
265
+
235
 ** Mobile devices (phones, etc)
266
 ** Mobile devices (phones, etc)
236
 To allow mobile devices to connect to the mesh you will need a second wifi adapter connected to your laptop/netbook/SBC. Plug in a second wifi adapter then reboot the system. The second adaptor will then create a wifi hotspot which mobile devices can connect to. The hotspot name also contains its local IP address (eg. "/mesh-192.168.1.83/").
267
 To allow mobile devices to connect to the mesh you will need a second wifi adapter connected to your laptop/netbook/SBC. Plug in a second wifi adapter then reboot the system. The second adaptor will then create a wifi hotspot which mobile devices can connect to. The hotspot name also contains its local IP address (eg. "/mesh-192.168.1.83/").
237
 
268
 

+ 2
- 0
src/freedombone-image-mesh View File

773
 
773
 
774
     generate_stunnel_keys
774
     generate_stunnel_keys
775
 
775
 
776
+    sed -i 's|tun-mtu .*|tun-mtu 1532|g' /home/$MY_USERNAME/client.ovpn
777
+
776
     systemctl restart openvpn
778
     systemctl restart openvpn
777
 }
779
 }
778
 
780