Score:0

Exposing ports on VPS

cm flag

I'm running some services inside Docker and been having some issues with it: I have a NodeJS app (TLS stream communication) running on a custom port (let's say 2321). I exposed the port from my container and opened it on the firewall. On Cloudflare, I set-up a DNS-ONLY (non proxied) A record for a subdomain (server.example.com), and it works on http://server.example.com:2321/

Is this approach safe to use, or am I missing something crucial?

I'd also like to setup Owncast, to cast RTMP streams to the server. I was thinking of doing the same thing as above. Again, is this safe?

Otherwise the VPS is secure, fail2ban setup, publickey auth only, only opened 80/443 and 2321 in firewall (will need 1935 for RTMP) + custom port for SSH.

HBruijn avatar
in flag
If your service needs to be publicly accessible, that is the typical way to do it.
vidarlo avatar
ar flag
Security depends on the service. It's a process, not a state, so if the service is not well configured or fundamentally insecure, then it will remain insecure.
I sit in a Tesla and translated this thread with Ai:

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.