From 7d287bdd4de2bb719879a725553897eb76e65fa3 Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:29:10 +0100 Subject: [PATCH 1/7] add missing dot --- ssh_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh_fr.md b/ssh_fr.md index 7a8e97e3..5c511207 100644 --- a/ssh_fr.md +++ b/ssh_fr.md @@ -79,4 +79,4 @@ yunohost user ssh list-keys ## SSH et sécurité -Voir la page dédiée à la [sécurité](security_fr) +Voir la page dédiée à la [sécurité](security_fr). From a9b4e7ac4af0012530b30e134526a7e68eeee135 Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:44:06 +0100 Subject: [PATCH 2/7] add missing dot --- ssh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh.md b/ssh.md index 95dc819f..b83e5a2a 100644 --- a/ssh.md +++ b/ssh.md @@ -80,4 +80,4 @@ yunohost user ssh list-keys ## Security and SSH -See the dedicated page [Security & SSH](security_en) +See the dedicated page [Security & SSH](security_en). From 4df144687370c96f0e117ca3c580edc4baf2e00e Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:44:21 +0100 Subject: [PATCH 3/7] fix some typos --- security.md | 9 +++++---- security_fr.md | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/security.md b/security.md index f21a2b58..caefb0d9 100644 --- a/security.md +++ b/security.md @@ -1,6 +1,6 @@ # Security -YunoHost has been developed to provide the best security without too much complication. Every protocol used in YunoHost are **encrypted**, only password's hash are stored and by default each user is able to access to his personal directory only. +YunoHost has been developed to provide the best security without too much complication. Every protocol used in YunoHost are **encrypted**, only password's hashs are stored and by default each user is able to access to his personal directory only. Two things remain important to note: @@ -61,7 +61,7 @@ nano /etc/ssh/sshd_config Port 22 # to replace by 9777 for example ``` -**Open the port** in firewall (you can use -6 option to limit forbid ipv4 connexion) +**Open the port** in firewall (you can use `-6` option to deny ipv4 connection) ```bash yunohost firewall allow TCP 9777 ``` @@ -102,7 +102,7 @@ Finally you have to restart fail2ban in order to apply the new configuration systemctl restart fail2ban.service ``` -**For the next SSH connections ** you need to add the `-p` option followed by the SSH port number. +**For the next SSH connections **, you need to add the `-p` option followed by the SSH port number. **Sample**: @@ -147,7 +147,8 @@ systemctl restart ssh --- ### Disable YunoHost API -YunoHost administration is accessible through an **HTTP API**, served on the 6787 port by default. It can be used to administrate a lot of things on your server, so malicious actors can also use it to damage your server. The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. +YunoHost administration is accessible through an **HTTP API**, served on the +6787 port by default (only on `localhost`). It can be used to administrate a lot of things on your server, so malicious actors can also use it to damage your server. The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. ```bash sudo service yunohost-api stop diff --git a/security_fr.md b/security_fr.md index 845a438f..a81f7736 100644 --- a/security_fr.md +++ b/security_fr.md @@ -72,7 +72,7 @@ nano /etc/ssh/sshd_config Port 22 # à remplacer par exemple par 9777 ``` -**Ouvrez le port** choisi dans le parefeu (vous pouvez utiliser l'option -6 pour interdire la connexion via ipv4) +**Ouvrez le port** choisi dans le parefeu (vous pouvez utiliser l'option `-6` pour interdire la connexion via ipv4) ```bash yunohost firewall allow TCP @@ -115,7 +115,7 @@ Il reste enfin à relancer fail2ban pour prendre en compte la nouvelle configura systemctl restart fail2ban.service ``` -**Pour les prochaines connexions SSH** il faudra ajouter l’option -p suivie du numéro de port SSH. +**Pour les prochaines connexions SSH**, il faudra ajouter l’option `-p` suivie du numéro de port SSH. **Exemple** : @@ -162,7 +162,8 @@ systemctl restart ssh ### Désactivation de l’API YunoHost -YunoHost est administrable via une **API HTTP**, servie sur le port 6787 par défaut. Elle permet d’administrer une grande partie de votre serveur, et peut donc être utilisée à des **fins malveillantes**. La meilleure chose à faire si vous êtes habitués aux lignes de commande est de désactiver le service `yunohost-api`, et **utiliser la [ligne de commande](/commandline_fr)** en SSH. +YunoHost est administrable via une **API HTTP**, servie sur le port 6787 par +défaut (seulement sur `localhost`). Elle permet d’administrer une grande partie de votre serveur, et peut donc être utilisée à des **fins malveillantes**. La meilleure chose à faire si vous êtes habitués aux lignes de commande est de désactiver le service `yunohost-api`, et **utiliser la [ligne de commande](/commandline_fr)** en SSH. ```bash sudo service yunohost-api stop From 7a4a33af0906602e475f1dc7542b0ad8bf5ef8df Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:47:36 +0100 Subject: [PATCH 4/7] prevent yunohost-api to restart --- security.md | 3 ++- security_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/security.md b/security.md index caefb0d9..21a0b6d6 100644 --- a/security.md +++ b/security.md @@ -151,7 +151,8 @@ YunoHost administration is accessible through an **HTTP API**, served on the 6787 port by default (only on `localhost`). It can be used to administrate a lot of things on your server, so malicious actors can also use it to damage your server. The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. ```bash -sudo service yunohost-api stop +sudo systemctl disable yunohost-api +sudo systemctl stop yunohost-api ``` ### YunoHost penetration test diff --git a/security_fr.md b/security_fr.md index a81f7736..1d92afe5 100644 --- a/security_fr.md +++ b/security_fr.md @@ -166,7 +166,8 @@ YunoHost est administrable via une **API HTTP**, servie sur le port 6787 par défaut (seulement sur `localhost`). Elle permet d’administrer une grande partie de votre serveur, et peut donc être utilisée à des **fins malveillantes**. La meilleure chose à faire si vous êtes habitués aux lignes de commande est de désactiver le service `yunohost-api`, et **utiliser la [ligne de commande](/commandline_fr)** en SSH. ```bash -sudo service yunohost-api stop +sudo systemctl disable yunohost-api +sudo systemctl stop yunohost-api ``` ### Tests d’intrusion de YunoHost From a422bf98e15b5b4f9a3d9a2f6d4c92f325e22e2a Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:50:17 +0100 Subject: [PATCH 5/7] remove useless word and change display --- security.md | 4 ++-- security_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/security.md b/security.md index 21a0b6d6..52bf4cd3 100644 --- a/security.md +++ b/security.md @@ -96,10 +96,10 @@ port = port = ``` -Finally you have to restart fail2ban in order to apply the new configuration +Finally you have to restart `fail2ban` in order to apply the new configuration ```bash -systemctl restart fail2ban.service +systemctl restart fail2ban ``` **For the next SSH connections **, you need to add the `-p` option followed by the SSH port number. diff --git a/security_fr.md b/security_fr.md index 1d92afe5..ec3d49a2 100644 --- a/security_fr.md +++ b/security_fr.md @@ -109,10 +109,10 @@ port = port = ``` -Il reste enfin à relancer fail2ban pour prendre en compte la nouvelle configuration +Il reste enfin à relancer `fail2ban` pour prendre en compte la nouvelle configuration ```bash -systemctl restart fail2ban.service +systemctl restart fail2ban ``` **Pour les prochaines connexions SSH**, il faudra ajouter l’option `-p` suivie du numéro de port SSH. From 2775decfcec74a90ad434e2d99e52b07cef50317 Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 03:53:15 +0100 Subject: [PATCH 6/7] fix line split --- security.md | 3 +-- security_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/security.md b/security.md index 52bf4cd3..74734edc 100644 --- a/security.md +++ b/security.md @@ -147,8 +147,7 @@ systemctl restart ssh --- ### Disable YunoHost API -YunoHost administration is accessible through an **HTTP API**, served on the -6787 port by default (only on `localhost`). It can be used to administrate a lot of things on your server, so malicious actors can also use it to damage your server. The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. +YunoHost administration is accessible through an **HTTP API**, served on the 6787 port by default (only on `localhost`). It can be used to administrate a lot of things on your server, so malicious actors can also use it to damage your server. The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. ```bash sudo systemctl disable yunohost-api diff --git a/security_fr.md b/security_fr.md index ec3d49a2..cc99be52 100644 --- a/security_fr.md +++ b/security_fr.md @@ -162,8 +162,7 @@ systemctl restart ssh ### Désactivation de l’API YunoHost -YunoHost est administrable via une **API HTTP**, servie sur le port 6787 par -défaut (seulement sur `localhost`). Elle permet d’administrer une grande partie de votre serveur, et peut donc être utilisée à des **fins malveillantes**. La meilleure chose à faire si vous êtes habitués aux lignes de commande est de désactiver le service `yunohost-api`, et **utiliser la [ligne de commande](/commandline_fr)** en SSH. +YunoHost est administrable via une **API HTTP**, servie sur le port 6787 par défaut (seulement sur `localhost`). Elle permet d’administrer une grande partie de votre serveur, et peut donc être utilisée à des **fins malveillantes**. La meilleure chose à faire si vous êtes habitués aux lignes de commande est de désactiver le service `yunohost-api`, et **utiliser la [ligne de commande](/commandline_fr)** en SSH. ```bash sudo systemctl disable yunohost-api From d2922937515fd42f3d7b4771c0a05e30bd4512b7 Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 11 Dec 2018 04:02:19 +0100 Subject: [PATCH 7/7] change fail2ban style --- security.md | 2 +- security_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/security.md b/security.md index 74734edc..c9bdc3fd 100644 --- a/security.md +++ b/security.md @@ -77,7 +77,7 @@ yunohost firewall reload yunohost firewall disallow TCP # port by default 22 ``` -You also need to give fail2ban the new SSH port. +You also need to give `fail2ban` the new SSH port. To do that you need to create the configuration file `my_ssh_port.conf` with the command diff --git a/security_fr.md b/security_fr.md index cc99be52..e48b8233 100644 --- a/security_fr.md +++ b/security_fr.md @@ -91,7 +91,7 @@ yunohost firewall reload yunohost firewall disallow TCP # port par défaut 22 ``` -Il convient également de donner à fail2ban le nouveau port SSH à bloquer en cas de bannissement d'une adresse IP. +Il convient également de donner à `fail2ban` le nouveau port SSH à bloquer en cas de bannissement d'une adresse IP. Pour cela il suffit de créer le fichier de configuration `my_ssh_port.conf` avec