SSH: no route to host

Re,
j’ai remis le port 22. Voici ce que donne la commande nmap sans le ping:

pascal@pascal-Latitude-5580:~$ nmap -Pn -p 22,80,443 192.168.1.58
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-02 16:52 CEST
Nmap scan report for 192.168.1.58
Host is up.

PORT    STATE    SERVICE
22/tcp  filtered ssh
80/tcp  filtered http
443/tcp filtered https

Nmap done: 1 IP address (1 host up) scanned in 3.04 seconds

C’est fou cette histoire. Comment ça peut tomber en panne sans y toucher en l’espace d’une nuit ?

@Pascal06
Et as-tu essayé de te connecter en ssh

  • via l’ipv6 de ton serveur ?
  • via le nom de domaine local ? ssh user@yunohost.local ?

Je propose de changer l’adresse ip du serveur. Que ce soit sur la box ou sur le serveur lui même et voir si ça résout le problème.

1 Like

Salut,
je viens d’essayer de me connecter en SSH IPV6 (je ne savais pas que ça pouvait se faire) et ça marche :smiley: :smiley: :smiley:
Mais pourquoi donc ça ne marche plus en IPV4 ?
Par contre, une chose que j’ai remarqué mais ça n’était pas vraiment gếnant, en même temps que mon problème de SSH l’adresse yunohost.local n’a plus marché non plus… Hasard ?
En tout cas j’espère que ça va tenir comme ça.
J’aurais quand même bien aimé comprendre ce qu’il se passe.
Merci à tous pour votre aide :slight_smile:

C’est sûr que ça n’est que du contournement… As-tu fermé l’accès depuis l’extérieur ?

Oui je préfère fermer le port 22. Je n’ai pas d’intérêt d’administrer le serveur à distance pour le moment…
Je vais essayer de changer de port sur le routeur…

Je me demande si tout cela n’a pas à voir avec la configuration adoptée sur ton routeur pour exposer ton serveur YNH.

The IP of your Yunohost looks like it is provided by DHCP. Could you post the output of ip a ? If the laptop that runs Yunohost has ethernet as well as WiFi active, it may switch between the two.

I have seen cases where the router would give another IP on giving a new lease, but keep the old IP cached. Since activating NAT does allow access, the router does seem to know where your Yunohost is.

Another thing that gives seemingly unexplainable symptoms, is DNS rebind protection. It should not get active when accessing a host by IP, but depending on the implementation, you never know. DNS rebind protection as such by a router prevents DNS queries to resolve to a private IP address.

In your opening post

Is that still the case? I don’t imagine you turned off ICMP replies on purpose.

Summarizing, this is what I gleaned from your journey:

  • Yunohost installed on laptop, DHCP IP = 192.168.1.58
  • After installation, all is OK:
    • web services and websites (all of them port 80 / 443) work
    • SSH from clients to YNH worked initially
  • The next day, web services and websites still work, but no access via SSH anymore
    • no log in fail2ban
    • no ping reply
  • No clear image of reason for no access:
    • clients in the LAN can not access YNH over SSH
    • on YNH one can connect to SSH on localhost
    • on YNH one can not connect to SSH via the external IP of the machine
    • it is not possible to connect with another client machine via the LAN IP
    • it is possible to connect with another cilent machine via the NAT’ed public IP of the router
  • YNH runs with no problem in the mean time
    • Outgoing SSH connections from YNH pose no problem
    • YNH services keep running as expected

Is that correct?

As Jarod suggested, changing the IP may reset some inconsistencies. Myself I’d put it on an IP outside of the DHCP range of your router and configure a static IP, but having it provided an IP via DHCP also works.