mirror of https://framagit.org/kyodev/kyopages.git
maj
This commit is contained in:
parent
915301e41f
commit
529ee767be
|
@ -51,6 +51,7 @@ voir les configs hors personnalisées avec leur origine:
|
||||||
LightDM peut rendre accessible la liste des utilisateurs possibles, avec le dernier utilisateur séclectionné, avec l'option `greeter-hide-users=false`. décommenter l'option dans /etc/lightdm/lightdm.conf ou ajouter le fichier
|
LightDM peut rendre accessible la liste des utilisateurs possibles, avec le dernier utilisateur séclectionné, avec l'option `greeter-hide-users=false`. décommenter l'option dans /etc/lightdm/lightdm.conf ou ajouter le fichier
|
||||||
```shell
|
```shell
|
||||||
su
|
su
|
||||||
|
mkdir -p /etc/lightdm/lightdm.conf.d/
|
||||||
echo '[Seat:*]' > /etc/lightdm/lightdm.conf.d/90sdeb.conf
|
echo '[Seat:*]' > /etc/lightdm/lightdm.conf.d/90sdeb.conf
|
||||||
echo 'greeter-hide-users=false' >> /etc/lightdm/lightdm.conf.d/90sdeb.conf
|
echo 'greeter-hide-users=false' >> /etc/lightdm/lightdm.conf.d/90sdeb.conf
|
||||||
```
|
```
|
||||||
|
|
|
@ -33,7 +33,7 @@ ssh-add -D
|
||||||
|
|
||||||
## sftp
|
## sftp
|
||||||
|
|
||||||
explorateur par exemple: `sftp://<user>@SRV/`
|
explorateur, par exemple: `sftp://<user>@SRV/` ou `sftp://<user>@ip:port/`
|
||||||
|
|
||||||
|
|
||||||
## export display
|
## export display
|
||||||
|
@ -55,6 +55,10 @@ l'application est sur le serveur, l'affichage sur le client
|
||||||
scp -P 'port' /chemin/fichierSource <user>@SRV:/chemin/cible
|
scp -P 'port' /chemin/fichierSource <user>@SRV:/chemin/cible
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## sshfs
|
||||||
|
|
||||||
|
voir <https://www.linuxtricks.fr/wiki/autour-du-protocole-ssh-utiliser-le-canal-de-communication#paragraph_sshfs-systeme-de-fichiers-sur-ssh>
|
||||||
|
|
||||||
|
|
||||||
## génération clé
|
## génération clé
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# serveur ssh, authentification par clé
|
# serveur ssh, authentification par clé
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* chmod 700 sur ~/.ssh (pas obligatoire mais conseillé)
|
* chmod 700 sur ~/.ssh (pas obligatoire mais conseillé)
|
||||||
* chmod 600 sur les fichiers key (obligatoire, vérification par openssh)
|
* chmod 600 sur les fichiers key (obligatoire, vérification par openssh)
|
||||||
* root requis pour la configuration du serveur ssh
|
* root requis pour la configuration du serveur ssh
|
||||||
|
|
||||||
|
|
||||||
## installation debian
|
## installation debian
|
||||||
|
|
||||||
si nécessaire
|
si nécessaire
|
||||||
|
@ -135,6 +135,58 @@ AllowUsers user1 user2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## fail2ban
|
||||||
|
|
||||||
|
```shell
|
||||||
|
su
|
||||||
|
apt install fail2ban
|
||||||
|
systemctl enable fail2ban.service
|
||||||
|
systemctl start fail2ban.service
|
||||||
|
|
||||||
|
echo [sshd] > /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "enabled = true" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "filter = sshd" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "#port = ssh, sftp, 5555" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "mode = extra" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "maxretry = 3" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "findtime = 3600" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
echo "bantime = 86400" >> /etc/fail2ban/jail.d/90sdeb.local
|
||||||
|
|
||||||
|
fail2ban-client reload
|
||||||
|
```
|
||||||
|
|
||||||
|
* par défaut, port = 0:65535
|
||||||
|
* si pas de syslog (journal systemd): `echo "backend = systemd" >> /etc/fail2ban/jail.d/90sdeb.local`
|
||||||
|
* enabled = true dans /etc/fail2ban/jail.d/defaults-debian.conf
|
||||||
|
* .local surcharge .conf, fail2ban/jail.d/ surcharge fail2ban/
|
||||||
|
|
||||||
|
|
||||||
|
vérifier:
|
||||||
|
```shell
|
||||||
|
systemctl status fail2ban.service
|
||||||
|
fail2ban-client -t
|
||||||
|
iptables -S | grep f2b
|
||||||
|
iptables -L
|
||||||
|
# target prot opt source destination
|
||||||
|
# REJECT all -- xyz anywhere reject-with icmp-port-unreachable
|
||||||
|
```
|
||||||
|
|
||||||
|
suivre les logs:
|
||||||
|
```shell
|
||||||
|
tail -f /var/log/fail2ban.log
|
||||||
|
```
|
||||||
|
|
||||||
|
unban:
|
||||||
|
```shell
|
||||||
|
fail2ban-client status sshd
|
||||||
|
fail2ban-client unban <IP>
|
||||||
|
```
|
||||||
|
mais ne résiste pas à un restart du service fail2ban
|
||||||
|
|
||||||
|
|
||||||
## liens divers
|
## liens divers
|
||||||
|
|
||||||
* <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>
|
* <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>
|
||||||
|
* <https://github.com/fail2ban/fail2ban/wiki>
|
||||||
|
* <https://wiki.debian-fr.xyz/Fail2ban>
|
||||||
|
* <https://doc.ubuntu-fr.org/fail2ban>
|
||||||
|
|
Loading…
Reference in New Issue