Is there a way to put a port from a docker container behind an nginx proxy, without exposing the port to the network? Said nginx not being in a container itself (so no docker network stuff)

@Matter you'll want to bind the docker port on localhost specifically:

docker run -p 127.0.0.1:8080:8080

If you don't specify it, it's essentially binding to 0.0.0.0 giving you the undesired effect.

@rune oh interesting, thanks for that. I didn't know I could bind to localhost like that. Can I do the same thing for a Wireguard tunnel for example 10.200.200.1:8080:8080?

Follow

@Matter I would think so. I'm not sure if that blocks localhost connections, though.

@rune oh thank you so much, it works and I feel much safer now that I can only get to some services through the wireguard VPN (I shouldn't have my parents fiddling with Sonarr now should I 😆)

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml