deployed to a fresh vps, opened port 8443, still 'refused to connect'???

firewallnetworkingvps6 replies 路 108 views 路 started
  1. Deployed my first real project to a fresh VPS today. On the server itself, curl localhost:8443 returns my page. from my laptop, the brwoser just says:

    ERR_CONNECTION_REFUSED. i opened the port in the firewall, i think. i restarted the app twice, i'm at the point where i'm ranodmly changing settings, which i know is a bad sign. how do i systematically find what's blocking it? i'm fine with commands, i just need to know which ones tell me smth useful.

    cry

    5
  2. check what the app is actually bound to: sudo ss -tlnp | grep 3000. if it shows 127.0.0.1:3000, it only accepts local connections and outsiders get refused. Configure it to listen on 0.0.0.0 (or the public interface). many dev servers default to localhost only. worked for me anyway 馃し

    1 1 helpful
  3. With Docker, look at the port mapping in docker ps. 127.0.0.1:3000->3000/tcp means its only published on localhost. Use -p 3000:3000 or "3000:3000" in Compose. Also note Dockers own firewall rules can bypass ufw, which surprises people in teh other direction. worked for me anyway 馃し

    0 2 helpful
  4. for a home server Id skip port forwarding entirely and use a tunnel or VPN... exposing a Raspberry Pi to the internet has its own risks.

    3 2 helpful

Reply to this topic

Sign in or create an account to reply.