traefik/integration/fixtures/tcp/ipallowlist.toml

52 lines
1.2 KiB
TOML
Raw Normal View History

2021-06-11 13:30:05 +00:00
[global]
checkNewVersion = false
sendAnonymousUsage = false
[log]
level = "DEBUG"
[entryPoints]
[entryPoints.tcp]
address = ":8093"
[api]
insecure = true
[providers.file]
filename = "{{ .SelfFilename }}"
## dynamic configuration ##
[tcp]
[tcp.routers]
[tcp.routers.to-whoami-a]
entryPoints = ["tcp"]
rule = "HostSNI(`whoami-a.test`)"
service = "whoami-a"
2022-10-26 15:16:05 +00:00
middlewares = ["blocking-ipallowlist"]
2021-06-11 13:30:05 +00:00
[tcp.routers.to-whoami-a.tls]
passthrough = true
[tcp.routers.to-whoami-b]
entryPoints = ["tcp"]
rule = "HostSNI(`whoami-b.test`)"
service = "whoami-b"
2022-10-26 15:16:05 +00:00
middlewares = ["allowing-ipallowlist"]
2021-06-11 13:30:05 +00:00
[tcp.routers.to-whoami-b.tls]
passthrough = true
[tcp.services]
[tcp.services.whoami-a.loadBalancer]
[[tcp.services.whoami-a.loadBalancer.servers]]
address = "{{ .WhoamiA }}"
2021-06-11 13:30:05 +00:00
[tcp.services.whoami-b.loadBalancer]
[[tcp.services.whoami-b.loadBalancer.servers]]
address = "{{ .WhoamiB }}"
2021-06-11 13:30:05 +00:00
[tcp.middlewares]
2022-10-26 15:16:05 +00:00
[tcp.middlewares.allowing-ipallowlist.ipAllowList]
2021-06-11 13:30:05 +00:00
sourceRange = ["127.0.0.1/32"]
2022-10-26 15:16:05 +00:00
[tcp.middlewares.blocking-ipallowlist.ipAllowList]
2021-06-11 13:30:05 +00:00
sourceRange = ["127.127.127.127/32"]