Aller au contenu

Teleport

Docker installation

Teleport documentation

Requirements

  1. Create folder teleport in your docker folder.

  2. Create subfolder data and config

docker
├── teleport
│    └── data
│    └── config

Installation

  1. Generate configuration file of teleport from your docker host.

    docker run --hostname localhost --rm \
    --entrypoint=/usr/local/bin/teleport \
    public.ecr.aws/gravitational/teleport-distroless:14.2.3 configure --roles=proxy,auth > yourpath/docker/teleport/config/teleport.yaml
    

    Warning

    Don't forget to put your personal path in the end of the command.

  2. Run docker

    Change public.ecr.aws/gravitational/teleport:13.4.13 with the latest stable version.

    docker run -d --hostname localhost --name teleport \
    -v /yourpath/docker/teleport/config:/etc/teleport \
    -v /yourpath/docker/teleport/data:/var/lib/teleport \
    -p 3025:3025 \
    -p 3080:3080 \
    --restart always \
    public.ecr.aws/gravitational/teleport:13.4.13
    
  3. If you need, create DNS record and reverse proxy redirection to https://your_docker_host_ip:3080.

  4. Check if container is running

    docker container ls | grep teleport
    

Create user

  1. Connect into docker.

    docker container exec -it <container_id> bash
    

    Info

    You can had the container id by this command.

    docker container ls | grep teleport | awk -F " " '{print $1}'
    
  2. Create user with all role.

    tctl users add <username> --roles=editor,access, auditor
    
  3. Copy/Paste the URL display in the terminal into your browser.

  4. Create strong password and setup OTP code.

  5. Now, you can access the web page at https://teleport.yourdoamine.fr or https://<docker_host_ip>:3080.

Edit the yaml for allow your dns name

It is necessary to edit the yaml file to allow your dns name teleport.yourdoamine.fr.

  1. Connect into docker.

    docker container exec -it <container_id> bash
    

    Info

    You can had the container id by this command.

    docker container ls | grep teleport | awk -F " " '{print $1}'
    
  2. Open yaml configuration file.

    vi /etc/teleport/teleport.yaml
    
  3. Add the below code under proxy_service: section.

    proxy_service:
      public_addr: teleport.yourdomain.fr:443
    
  4. Save, ESC.

    :wq
    
  5. Exit docker container console and restart the container.

    docker container restart <container_id>
    

!!NOT WORKING!! Edit timeout idle

  1. Connect into docker.

    docker container exec -it <container_id> bash
    

    Info

    You can had the container id by this command.

    docker container ls | grep teleport | awk -F " " '{print $1}'
    
  2. Open yaml configuration file.

    vi /etc/teleport/teleport.yaml
    
  3. Add the below code under auth_service: section.

    auth_service:
      client_idle_timeout: never
    
  4. Save, ESC.

    :wq
    
    5. Exit docker container console and restart the container.

    docker container restart <container_id>