Traefik config menu
Here are some extra things you can do in the Traefik config menu system that were skipped in the main text of the book.
Create custom routes
The main way to create custom routes is with the contextual route
CLI command:
Run this on your Raspberry Pi
sentry route set pi whoami.example.com
Or with all of the explicit options set:
Run this on your Raspberry Pi
sentry route set pi \
whoami.example.com 10.13.16.2 443 \
--proxy-protocol true --restart true
And you can list all of your routes:
Run this on your Raspberry Pi
sentry route list
Another way you can create routes is through the interactive Traefik config menu:
Run this on the Raspberry Pi
sentry make traefik config
(stdout)
? Traefik: > Config Install (make install) Admin Exit (ESC) ? Traefik Configuration: ^ Entrypoints (including dashboard) TLS certificates and authorities Middleware (including sentry auth) > Advanced Routing (Layer 7 / Layer 4 / WireGuard) Error page template Logging level Access logs ? Traefik routes > Configure layer 7 TLS proxy Configure layer 4 TCP/UDP proxy Configure wireguard VPN ? Layer 7 TLS Proxy: List layer 7 ingress routes > Add new layer 7 ingress route Remove layer 7 ingress routes Disable layer 7 TLS Proxy Enter the public domain (SNI) for the route: : s3.pi.example.com Enter the destination IP address to forward to: : 10.13.16.2 Enter the destination TCP port to forward to: : 443 > Do you want to enable Proxy Protocol for this route? Yes ## Layer 7 TLS Proxy is ENABLED. ## Configured Layer 7 Routes: Entrypoint Destination_address Destination_port Proxy_protocol ---------- ------------------- ---------------- -------------- s3.pi.example.com 10.13.16.2 443 2 ? Layer 7 TLS Proxy: List layer 7 ingress routes > Add new layer 7 ingress route Remove layer 7 ingress routes Disable layer 7 TLS Proxy Enter the public domain (SNI) for the route: : s3-console.pi.example.com Enter the destination IP address to forward to: : 10.13.16.2 Enter the destination TCP port to forward to: : 443 > Do you want to enable Proxy Protocol for this route? Yes ## Layer 7 TLS Proxy is ENABLED. ## Configured Layer 7 Routes: Entrypoint Destination_address Destination_port Proxy_protocol ---------- ------------------- ---------------- -------------- s3.pi.example.com 10.13.16.2 443 2 s3-console.pi.example.com 10.13.16.2 443 2
Press ESC
three times to go back to the main menu, and re-install Traefik:
(stdout)
? Traefik: Config > Install (make install) Admin Exit (ESC)
After installation, press ESC
to quit the config tool.