403 despite inclusion of name and IP range in allowFrom #50
Replies: 4 comments 6 replies
-
Hi @Know1GitzMe, It looks like socket-proxy doesn't recognize the IP address as an IP address and tries to look it up over DNS. Could you please check if allowfrom is set correctly? The last line you posted shows |
Beta Was this translation helpful? Give feedback.
-
Despite the attempts to work around the attempts to resolve CIDR thing, I have made progress but still have the same net results. It is different than I have read on this forum it should behave. Do you have suggestions on how to test DNS resolution within the container itself? I now have identified what I believe to be a resolvable Service Name and a resolvable Alias on that network. I believe this because I no longer see any errors like this for any of the names I provide `time=2025-05-17T15:04:00.273Z level=WARN msg="error looking up allowed client hostname" hostname=10.0.1.0/24 error="lookup 10.0.1.0/24: no such host"' I do however still get the forbidden IP and a 403. The lack of error implies I am getting a resolution for the names, and the 403 implies that that resolution is not enabling it. Any suggestions on further troubleshooting? |
Beta Was this translation helpful? Give feedback.
-
I saw and tested the test image... which now seems to be resolving the IPs but I woudl expect the error to go away as a result and do not: time=2025-05-19T11:17:43.544Z level=INFO msg="starting socket-proxy" version=testing-b13f47149d2c53a62f309df77807717d1b53624c os=linux arch=amd64 runtime=go1.24.3 URL=github.com/wollomatic/socket-proxy
time=2025-05-19T11:17:43.544Z level=INFO msg="configuration info" socketpath=/var/run/docker.sock listenaddress=0.0.0.0:2375 loglevel=DEBUG logjson=false allowfrom=[10.0.2.0/24] shutdowngracetime=5
time=2025-05-19T11:17:43.544Z level=INFO msg="watchdog enabled" interval=3600 stoponwatchdog=true
Request allowlist:
Method Regex
GET ^/v1\..{1,2}/(version|containers/.*|events.*)$
time=2025-05-19T11:17:43.544Z level=DEBUG msg="checking socket availability" origin=checkSocketAvailability
time=2025-05-19T11:17:43.544Z level=INFO msg="socket-proxy running and listening..."
time=2025-05-19T11:17:43.544Z level=DEBUG msg="watchdog running"
time=2025-05-19T11:17:43.658Z level=WARN msg="blocked request" reason="forbidden IP" method=GET URL=/v1.24/version client=10.0.1.63:42028 response=403
time=2025-05-19T11:17:44.072Z level=WARN msg="blocked request" reason="forbidden IP" method=GET URL=/v1.24/version client=10.0.1.63:42040 response=403
time=2025-05-19T11:17:45.386Z level=WARN msg="blocked request" reason="forbidden IP" method=GET URL=/v1.24/version client=10.0.1.63:50692 response=403
time=2025-05-19T11:17:47.753Z level=WARN msg="blocked request" reason="forbidden IP" method=GET URL=/v1.24/version client=10.0.1.63:50694 response=403 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help. I know you mentioned that you were going to further update the info with stuff to help resolution troubleshooting. ALthough I think I will be able to get this working, a more secure config would be to limit it by service name. I do not think that is working and think I have two names being identified and translated, yet not allowing it to pass. Is this still something you intend to pick at? thanks again. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am in a swarm and trying to specify the subnet of an overlay network scoped to my swarm dedicatd to socket proxy requests. I hope to encrypt it... but for now am not.
I have read the other discussions involving naming in Swarm, but I think my config should not be impacted by naming due to opening the entire network's range... including the one being reported as prohibited.
I see
`time=2025-05-17T15:04:00.273Z level=WARN msg="error looking up allowed client hostname" hostname=10.0.1.0/24 error="lookup 10.0.1.0/24: no such host"'
and then
time=2025-05-17T15:04:00.274Z level=WARN msg="blocked request" reason="forbidden IP" method=GET URL=/v1.24/version client=10.0.1.4:56240 response=403
despite my config info showing these listed in the allowfrom:
time=2025-05-17T15:03:59.342Z level=INFO msg="configuration info" socketpath=/var/run/docker.sock listenaddress=0.0.0.0:2375 loglevel=DEBUG logjson=false allowfrom=10.0.1
Beta Was this translation helpful? Give feedback.
All reactions