Score:0

How can I make my apps only available from nginx and not from the direct ports on ubuntu?

ke flag

I have a VPS with ubuntu and I want to host my apps on it. I run my apps with docker and it is working - my apps run on localhost with the port I set them to using the docker-compose file. The thing is, that I can also access those apps through the server's ip (by entring the port number of the app) even though I didn't configure it on nginx. So I can go to example.com:3000 for example, and see my node app even if I didn't configure nginx to host it.

I want my apps to only be accessible through nginx, and only if configure them to. Is there a way to do it? I tried activating the firewall using ufw enable, but it doesn't seem to do anything...

in flag
Bind the ports to localhost instead of all interfaces.
in flag
Does this answer your question? [How to correctly block access to a port forwarded docker container?](https://serverfault.com/questions/1080075/how-to-correctly-block-access-to-a-port-forwarded-docker-container)
R7B9 avatar
ke flag
@GeraldSchneider Thanks! That was it, it works now!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.