readme update

This commit is contained in:
aptalca
2020-03-23 13:03:14 -04:00
parent 721e5f53ab
commit 73f038d78f
+6 -6
View File
@@ -4,6 +4,8 @@ This mod adds ssh tunnelling to openssh-server, by enabling tcp forwarding durin
In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-ssh-tunnel`
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-ssh-tunnel|linuxserver/mods:openssh-server-mod2`
Note: `GatewayPorts` is set to `clientspecified`, this moves the responsibility to define the gateway host of the port to the client that opens the tunnel, e.g. `*:8080` to forward 8080 to all connection, default is localhost only.
In addition it is still necessary to expose the same port on the container level, using either the `--expose` (only to other containers) or the `--port` (expose on host level/internet) run options (or the counterparts in docker-compose).
@@ -13,23 +15,21 @@ When creating the container with the following setup:
```
version: '2'
services:
ssh-tunnel:
openssh-server:
image: linuxserver/openssh-server
environment:
- PUBLIC_KEY_FILE=/config/id_rsa.pub
- TCP_FORWARDING=true
- DOCKER_MODS=linuxserver/mods:openssh-server-ssh-tunnel
volumes:
- ./id_rsa.pub:/config/id_rsa.pub
- /path/to/appdata/config:/config
expose:
- 30000
ports:
- 2222:2222
```
It's possible to expose the clients port 8080 through the containers port 30000 like this:
It's possible to expose the client's port 8080 through the container's port 30000 like this:
```
ssh -R *:30000:localhost:8080 example.com -p 2222
```
Port 30000 will then only be available to other containers (e.g. a web server acting as a reverse proxy), when using `ports` instead of `expose` the port would be accessible from the host (and the network it resides in, e.g. the internet). The client command can be automated using autossh.
Port 30000 will then only be available to other containers (e.g. a web server acting as a reverse proxy). When using `ports` instead of `expose` the port would be accessible from the host (and the network it resides in, e.g. the internet). The client command can be automated using autossh.