"No Route to Host" on an XMPP STARTTLS Check: Tracing the Failure to a Degraded Home Router

Abstract: An OpenSSL "No route to host" error means the TCP connection failed before TLS ever began. Here is how to trace packets hop by hop, and why a router reboot resolved it.

Created: 2026-11-02 by

If openssl s_client fails with BIO_connect: No route to host (errno 113), the TLS layer never came into play: the underlying TCP connection to the server could not be established, so no handshake was even attempted. In a home-hosted setup such as a Prosody XMPP server behind a consumer router, this almost always points at the network path rather than the server itself — and in the incident documented here, the culprit was a Fritz!Box whose firewall and port-forwarding state had silently degraded. The server configuration, including its self-signed certificate, was correct all along; a router reboot restored connectivity.

What "No route to host" really tells you

OpenSSL is a TLS library, but before it can negotiate anything it must obtain a TCP socket. The error therefore comes from the operating system's connect() call, not from any TLS logic. errno 113 is EHOSTUNREACH: either your own host has no route, or — far more common across the internet — a router or firewall somewhere along the path actively answered with an ICMP "host unreachable" message.

It helps to distinguish the three TCP connection errors you will typically see:

  • No route to host (113) — something on the path actively signalled that the destination is unreachable; typical of a misbehaving firewall or router.
  • Connection timed out (110) — packets are silently dropped; the classic symptom of a filtering firewall.
  • Connection refused (111) — the host is reachable, but nothing is listening on that port, or it answered with a reset.

So the OpenSSL output is not unhelpful. It says precisely that TLS was never reached and that the failure lies below it. Your task is to find where the packets die.

Why DNS lookups and ping still succeed

nslookup exercises only DNS, and ping exercises only ICMP echo. Neither opens a TCP connection to port 5222, so both can report success while the actual service path is broken. A router can happily resolve names and answer ICMP while its forwarding rules for TCP are stuck.

One detail that looks alarming but is perfectly normal: on mobile networks, a client may connect to an address such as 64:ff9b::5900:df84. That is a DNS64/NAT64 translation of an IPv4 address — an IPv6-only carrier network translating towards your IPv4 server. Seeing such an address in a successful s_client run is not an error.

Tracing the failure hop by hop

  1. Confirm what clients actually resolve. Compare the DNS answer against the router's current WAN IP — with a dynamic address, the record can lag behind after an IP change.
  2. Capture on the server while repeating the connection attempt from outside:
tcpdump -ni any tcp port 5222
  1. If SYN packets arrive, the problem is on the server itself: check the local firewall (nftables/iptables) and confirm Prosody is listening with ss -tlnp | grep 5222.
  2. If nothing arrives, move the investigation upstream. Inspect the router's port-forwarding rules and event log, or capture from an independent vantage point such as a small VPS to see whether packets even leave your provider's network.

The decisive comparison is at the router: packets arriving on the WAN interface but never being forwarded towards the server mean the router itself is dropping or mis-routing them.

When the router itself is the fault

Consumer routers that run for months with a dynamic WAN address can accumulate stale state: after an IP change, port-forwarding bindings or the connection-tracking table can end up inconsistent, and the firewall stops accepting new connections to forwarded ports even though every rule looks correct in the web interface. Rebooting rebuilds NAT and firewall state from the stored configuration — which is exactly what resolved this case. Afterwards, s_client completed a full TLSv1.3 handshake (cipher TLS_AES_256_GCM_SHA384, X25519 key exchange), proving the service was healthy again.

Note that the remaining verify error: self-signed certificate is expected with certificates generated by prosodyctl and does not block clients that are configured to trust them.

Keeping a dynamic-IP home server reachable

  • Schedule a periodic router reboot during a quiet hour.
  • Monitor the real path — a TCP connection plus STARTTLS — not just ICMP.
  • Automate DNS updates so the record tracks IP changes promptly.
  • After each IP change, verify the port forwarding is still bound to the new address.
  • Use native IPv6 end-to-end if your provider offers it; it removes NAT state from the equation entirely.
  • Keep an out-of-band management path (for example, a VPN into the LAN) so you can reach the router even when forwarding is broken.
#!/bin/sh
# xmpp-watch: log when the STARTTLS path breaks
if ! openssl s_client -starttls xmpp -connect home.example.de:5222 \
     </dev/null >/dev/null 2>&1; then
  echo "XMPP STARTTLS unreachable at $(date)" >> /var/log/xmpp-watch.log
fi

Frequently Asked Questions

Does "No route to host" indicate a TLS or certificate problem?

No. It is a TCP-level failure reported by connect() before any TLS bytes are exchanged. Certificates only become relevant once the TCP connection and the STARTTLS upgrade have succeeded.

Is openssl s_client related to SSH?

No. OpenSSL implements TLS; OpenSSH implements the SSH protocol. They are separate tools on separate ports. Debugging an SSH problem with s_client — or assuming a TLS error is an SSH error — sends the investigation down the wrong path.

Why did ping and nslookup work while the connection failed?

They test different things: name resolution and ICMP reachability. The failing component — TCP forwarding to port 5222 through the router — is exercised by neither, so both tools can stay green during the outage.

Is the "self-signed certificate" verification error a fault?

Not by itself. Prosody certificates created with prosodyctl are self-signed, so OpenSSL reports verify return code 18 while still completing the handshake. Clients that trust the certificate work fine; for less friction, deploy a certificate from a public CA such as Let's Encrypt.

What does connecting to a 64:ff9b:: address mean?

It is a DNS64/NAT64 address synthesized by a mobile carrier so that IPv6-only clients can reach IPv4 servers. The connection is translated back to your server's IPv4 address and is not an error.

How do I detect this failure automatically next time?

Run a scheduled check that performs a genuine STARTTLS connection, as in the script above, and alert on failure. Because ping and DNS can remain healthy throughout this kind of outage, the check must actually open a TCP connection to the service port.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More