You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use it with Traefik v3. I guess this is supposed to be allowed with the option -allowfrom=reverse-proxy in the command but with swarm is that works ?
(reverse-proxy in the name of my traefik service in the stack)
It works if I set ip (but I would like it dynamic) and if I allow all GET
services:
dockerproxy:
image: wollomatic/socket-proxy:1 # see https://github.com/wollomatic/socket-proxy for reference
command:
- '-loglevel=info' # set to debug for far more logging
- '-allowfrom=10.0.2.67,10.0.2.68,10.0.2.62'
- '-listenip=0.0.0.0'
- '-allowGET=.*' # this regexp allows readonly access only for requests that traefik needs
- '-shutdowngracetime=5'
- '-watchdoginterval=600'
- '-stoponwatchdog'
The above error message is caused by the -allowfrom configuration.
If the hostnames in Swarm are dynamically generated, it is difficult to set an allowlist for them. A possibility would be to allow a local network range, e.g., -allowfrom=10.0.2.0/24. Please keep in mind that this can easily result in insecure configurations (on the other hand, most of the other Socket-Proxy-Software allows access from any IP).
The -allowGET option depends on how you use Traefik:
You probably need another configuration for the allowlist if you use the swarm provider (https://doc.traefik.io/traefik/providers/swarm/): Maybe -allowGET=.* is fine in that case. You can enable the debug logging and see how the requests look. After that, you can create a more specific working regexp.
Activity
D0wn3r commentedon Sep 19, 2024
It works if I set ip (but I would like it dynamic) and if I allow all GET
wollomatic commentedon Sep 19, 2024
The above error message is caused by the
-allowfromconfiguration.If the hostnames in Swarm are dynamically generated, it is difficult to set an allowlist for them. A possibility would be to allow a local network range, e.g.,
-allowfrom=10.0.2.0/24. Please keep in mind that this can easily result in insecure configurations (on the other hand, most of the other Socket-Proxy-Software allows access from any IP).The
-allowGEToption depends on how you use Traefik:If you use the
dockerprovider (https://doc.traefik.io/traefik/providers/docker/), the'-allowGET=/v1\..{1,2}/(version|containers/.*|events.*)'is fine for socket-proxy.You probably need another configuration for the allowlist if you use the
swarmprovider (https://doc.traefik.io/traefik/providers/swarm/): Maybe-allowGET=.*is fine in that case. You can enable the debug logging and see how the requests look. After that, you can create a more specific working regexp.Also, see #30
(I'll convert this issue to a discussion)