Website Shows Connection Refused
Short answerConnection refused means the host is reachable but nothing is accepting on that port. Check listeners with sudo ss -tlnp, start the service, confirm the port, and verify UFW allows traffic. SSH refused → start sshd; HTTP refused → start Nginx/Apache.
Overview
Customers seeing Connection refused connecting to SSH, HTTP, or application ports on VPSGrid Linux VPS — use How to Connect via SSH to Your VPSGrid Linux VPS for first-time setup context.
VPSGrid sells unmanaged VPS with root or administrator access. Guest OS configuration, application data, backups, and patching inside the VM are your responsibility unless a separate product is documented. Review What Is an Unmanaged VPS at VPSGrid? and Security Responsibilities on Unmanaged VPS before expecting support to perform stack work.
VPSGrid provides unmanaged Linux and Windows VPS on US-Based KVM infrastructure with NVMe storage and Proxmox virtualization. You manage the guest OS, applications, backups, and security. Current plan specifications appear at checkout on vpsgrid.net — articles do not publish fixed pricing.
Decision guidance: refused vs timeout vs 502
| Error | Meaning | Next guide |
|---|---|---|
| Connection refused | Host reachable; port closed | This article |
| Connection timed out | Firewall/filter dropping | SSH Connection Timeout on VPSGrid VPS |
| 502 Bad Gateway | Proxy up; upstream down | Website Shows 502 or 504 Error |
sudo ss -tlnpSSH connection refused
systemctl start ssh && systemctl enable sshIf sshd listens on port 2222, connect with ssh -p 2222 user@IP and ensure UFW allows that port.
HTTP/HTTPS connection refused
systemctl start nginx && systemctl status nginxApplication ports (Node, Gunicorn)
Apps on 127.0.0.1:3000 refuse direct public connections — use Nginx reverse proxy per Deploy a Node.js App on VPSGrid with PM2 and Nginx. PHP-FPM uses Unix sockets — refused on 9000 often means testing wrong endpoint; see Website Shows 502 or 504 Error for upstream/socket mismatches.
Troubleshooting matrix
| Symptom | Likely cause | What to check |
|---|---|---|
| Refused on 22 | sshd stopped | systemctl start ssh |
| Refused on 80 | Web server down | systemctl start nginx or apache2 |
| Refused on custom port | App not started | pm2 list or systemctl status app |
| Timeout not refused | Firewall | How to Configure UFW Firewall on Ubuntu/Debian |
Verify
nc -zv IP PORTreturns succeeded for target portcurl -I http://IPreturns HTTP headers when web server up- MariaDB bound to 127.0.0.1 only — port 3306 should refuse public connections (expected)
Security considerations
Do not expose database ports (3306) publicly — bind MariaDB to localhost. Use Using the VPSGrid NoVNC Console if SSH refused and you cannot reach the server otherwise.
MariaDB and Redis binding
Connection refused on 3306 or 6379 from the public internet is often correct — databases should bind 127.0.0.1. Refused on 22 or 80 when services should be public indicates misconfiguration, not security success.
SELinux on RHEL-family images
AlmaLinux/Rocky may block Nginx proxy connections when SELinux enforcing. Check ausearch -m avc -ts recent if services run but public access fails with permission errors in logs.
Capture baseline metrics first
Save command output before changes so you can compare after remediation and attach evidence to support tickets if needed.
Read-only diagnosis first
Prefer inspection commands that do not delete data until you identify root cause.
External monitoring correlation
Match external uptime monitor timestamps with auth and application logs.
Next learning step
For SSH timeouts vs refused, compare SSH Connection Timeout on VPSGrid VPS.
Frequently Asked Questions
What does connection refused mean on SSH?
The TCP packet reached the host but nothing accepted on that port — sshd stopped, wrong port, or service bound to localhost only. Different from timeout (filtered) — How to Connect via SSH to Your VPSGrid Linux VPS.
Connection refused on HTTP port 80?
Nginx or Apache not running or not listening on public interface. Start web server and verify UFW allows 80/443 — How to Configure UFW Firewall on Ubuntu/Debian.
Can fail2ban cause connection refused?
Fail2ban typically drops packets (timeout) via iptables REJECT/DROP — not classic refused. Check jail status — Fail2ban Setup on VPSGrid Linux VPS.
App connection refused behind Nginx?
Upstream not listening — related to Website Shows 502 or 504 Error when proxy fails differently.
Related Articles
Next steps on VPSGrid
Open a support ticket if connection refused persists on infrastructure-assigned primary IP with documented service status — guest OS service configuration remains self-managed.
Need More Help?
Search this knowledgebase for related guides. If the issue appears infrastructure-related (provisioning, billing, primary IP assignment), open a ticket at billing.vpsgrid.net with your service ID, primary IP, and steps already tried. See What Information to Include in a Support Request and Security Responsibilities on Unmanaged VPS for scope.
Was this answer helpful?