Outils pour utilisateurs

Outils du site


fr:cube:install

**Ceci est une ancienne révision du document !**

FIXME Cette page n'est pas encore traduite entièrement. Merci de terminer la traduction
(supprimez ce paragraphe une fois la traduction terminée)

Installation d'une brique

Cette procédure explique comment installer une brique internet et la configurer avec le VPN de Neutrinet.

Générer les certificats du VPN

Pour utiliser notre VPN, vous devez suivre ce processus d'enregistrement. Vous aurez besoin de générer une clé privée et d'obtenir un certificat VPN personnel.

Dans le cas où, pour une certaine raison, vous réinstallez une brique et que vous souhaitez réutiliser vos identifiants VPN, vous pouvez les trouver sur une brique en fonction (ou à l'arrêt) sous la forme des fichiers : user.crt, user.key, ca-server.crt et credentials dans etc/openvpn/keys.

Générer un fichier .cube

Pour configurer l'application VPN de Yunohost, vous aurez besoin d'un fichier cube qui contient vos identifiants et certificats VPN. Mettez tous vos fichiers VPN dans le même dossier.

Vous aurez aussi besoin d'un fichier contenant vos identifiants choisis pendant le processus d'enregistrement du VPN.

snippet.bash
cd <chemin/vers/le/dossier>
nano auth

Dans le fichier, écrivez vos identifiants, par exemple :

snippet.bash
une.adresse@mail.xyz
MotDePasse or PhraseDePasse

Dans le même dossier, téléchargez le script de Neutrinet permettant de générer un .cube :

snippet.bash
wget https://git.domainepublic.net/Neutrinet/scripts/-/raw/master/cubefile/faire_un_point_cube.sh

Exécutez le script :

snippet.bash
./faire_un_point_cube.sh 

Matériel nécessaire

C'est le strict minimul dont vous aurez besoin :

  • un ordintaeur (préférablement un système Linux/Unix/BSD) pour effectuer l'installation
  • un A20-OLinuXino-LIME board
  • une carte microSD où le système d'exploitation de la brique (Yunohost/Debian) sera stocké
  • une antenne WiFi MOD-WIFI-R5370-ANT (optionelle)
  • un adpatateur 5V DC
  • un compte VPN chez Neutrinet

Vous pouvez trouver des détails sur les composants et les acheter ici

Autres

Vous aurez également besoin :

  • Une connexion internet pour télécharger l'image de Yunohost.
  • Un câble ethernet pour connecter votre brique à votre routeur (par exemple la box internet de votre ISP)

Install Yunohost on the SD Card

Download the Yunohost image

Download the latest version of Yunohost for internet cubes (Olimex Lime1 or Lime2) from https://yunohost.org/fr/install/hardware:internetcube

For instance, for a Lime1:

snippet.bash
wget https://github.com/YunoHost/arm-images/releases/download/v2021.02/internetcube_4.1.7.1_v2021.02_lime.img.gz

Uncompress the Yunohost image:

snippet.bash
gunzip internetcube_4.1.7.1_v2021.02_lime.img.gz

Flash the SD card

First, find the device name of your SD card:

snippet.bash
lsblk

Usually, it's mmcblk0

Install the image on your SD card (all data on the SD card will be lost).

snippet.bash
sudo dd if=internetcube_4.1.7.1_v2021.02_lime.img of=/dev/mmcblk0 status=progress

Remove the SD card from your computer when it's done.

Start your Cube

Prepare it

  • Make sure the Cube is not connected to a power source (e.g: the power cable should be unplugged)
  • Insert the WiFi antenna into the USB port of the Cube's board
  • Insert the SD card into your Cube
  • Connect your Cube to an ethernet cable that is connected to your home router (i.e your ISP internet box)
  • Make sure your computer is connected (via WiFi or ethernet) to your home router too (you will connect to your Cube via the local network)

Boot it

  • Connect the power cable to the Cube to start it
  • Wait a couple of minutes to let the Cube start and connect to the network

Find it on the network

In order to connect to your Cube, you need to find its IP address on your local network.

In your terminal, run:

snippet.bash
./install-sd.sh -l

The script can be download here : https://github.com/labriqueinternet/install.labriqueinter.net/blob/master/install-sd.sh

The output should look like this:

Internet Cubes found on the network:

  1. YunoHost Admin:    https://192.168.1.46
     SSH Access:        ssh root@192.168.1.46
     HyperCube Debug:   http://192.168.1.46:2468/install.html

In this example, the IP address of your Cube on the local network is: 192.168.1.46

If the script cannot find your cube, try again a couple of minutes later.

Run the Yunohost postinstall

Connect to https://192.168.1.46 (Please replace 192.168.1.46 with the IP address of your Cube found in the previous step)

Start the Yunohost postinstall and provide: - The main domain name - The admin password You will be able to change the admin password later on if you want.

Create the first user

In the admin panel, go to Users and create the first user by providing: - username - firstname - lastname - password This user is a bit special because it will be linked to the root@domain.tld mail address.

Install the VPN client

In the admin panel, go to Applications and click on the Install button.

Search for VPN Client app, then install it.

Copy the .cube file you generated earlier. From your machine, run:

snippet.bash
scp neutrinet.cube admin@192.168.1.46:/tmp/neutrinet.cube

(Please replace 192.168.1.46 with the IP address of your Cube found in the previous step) The admin password of your Cube is the same as the one for the admin panel.

Connect to your Cube via SSH as admin:

snippet.bash
ssh admin@192.168.1.46

Configure the VPN client:

snippet.bash
ynh-vpnclient-loadcubefile.sh -u raoul -c /tmp/neutrinet.cube -p neutrinet

(Please replace raoul and neutrinet with the username and password of the first user)

Check that your cube is connected to the VPN: - Run ip a from the cube and check if there is a tun0 interface - Connect to the IP in your web browser

Install the Neutrinet app

Your VPN certificate will be valid for 1 year.

Install the Neutrinet app for Yunohost in order to let the cube automatically renew the certificate before expiration:

snippet.bash
sudo yunohost app install neutrinet

You can keep the default values.

Configure the DNS records of your domain

See this page.

Troubleshootings

Issues with `/tmp` in RAM

By default, the files /tmp folder are stored in RAM, which isn't a good idea when you have less than 1Gb available in a cube. See tmpfs / armbian

You can disable this by running the following:

snippet.bash
sudo sed s/^ENABLED=true/ENABLED=false/ /etc/default/armbian-zram-config -i
sudo sed 's/^tmpfs/# tmpfs/' /etc/fstab -i

If you have issues, or maybe you were able to find a fix for an issue, do not hesitate to contact us : https://chat.neutrinet.be

fr/cube/install.1623922899.txt.gz · Dernière modification : 2021/06/17 11:41 de celo