Jump to content

How to use Traefik's routing capabilities


FunkyBuddha

Recommended Posts

Posted

This sample configuration port forwards traffic to an IP. In this example, I'm forwarding TDARR and Samba ports to an IP.

traefik.yml:

Quote


global:
  checkNewVersion: true
  sendAnonymousUsage: false

api:
  dashboard: true
  insecure: true

entryPoints:
  tdarr:
    address: ":8266"
    transport:
      respondingTimeouts:
        readTimeout: 0
        writeTimeout: 0
        idleTimeout: 0

  smb:
    address: ":445"
    transport:
      respondingTimeouts:
        readTimeout: 0
        writeTimeout: 0
        idleTimeout: 0

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    filename: /config.yml
    watch: true

 

config.yml:

Quote


tcp:
  routers:
    tdarr:
      entryPoints:
        - "tdarr"
      rule: "HostSNI(`*`)"
      service: tdarr
    smb:
      entryPoints:
        - "smb"
      rule: "HostSNI(`*`)"
      service: smb

  services:
    tdarr:
      loadBalancer:
        servers:
         - address: "10.10.10.10:8266"
    smb:
      loadBalancer:
        servers:
         - address: "10.10.10.11:445"

middlewares:
    default-whitelist:
      IPAllowList:
        sourceRange:
        - "10.0.0.0/24"
        - "192.168.0.0/16"
        - "172.0.0.0/8"

    secured:
      chain:
        middlewares:
        - default-whitelist
        - default-headers

 

  • Thanks 1

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...