tech:tunnel_ssh_over_https
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:tunnel_ssh_over_https [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:tunnel_ssh_over_https [2026/05/30 21:44] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Tunnel SSH over HTTPS | ||
| + | |||
| + | |||
| + | Voir [[Notes socat|socat]] | ||
| + | |||
| + | corkscrew | ||
| + | |||
| + | http:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | ## SSLH | ||
| + | |||
| + | Voir | ||
| + | * http:// | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | apt-get install sslh | ||
| + | ~~~ | ||
| + | |||
| + | Nous configurons notre serveur web en HTTPS, mais au lieu d' | ||
| + | |||
| + | Puis nous configurons SSLH pour écouter sur le port 443 et si HTTPS se connecter sur 127.0.0.1: | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | # | ||
| + | DAEMON_OPTS=" | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | service nginx rstart | ||
| + | service sslh restart | ||
| + | ~~~ | ||
| + | |||
| + | à présent on peux serfer sur https:// | ||
| + | et aussi se connecter en ssh via `ssh www.acme.fr -p 443` | ||
| + | |||
| + | Add the following to your fail2ban jail.conf | ||
| + | In Debian you'd append it to / | ||
| + | `/ | ||
| + | ~~~ini | ||
| + | [sslh-ssh] | ||
| + | enabled = true | ||
| + | filter = sslh-ssh | ||
| + | action = iptables-multiport[name=sslh, | ||
| + | logpath = / | ||
| + | maxretry = 5 | ||
| + | ~~~ | ||
| + | |||
