Serveur innaccesible depuis l'intérieur

:uk:/:us: English version - Français ci dessous.

My YunoHost server

Hardware: Old laptop or computer.
YunoHost version: 3.7.1.1
I have access to my server : SSH, webadmin, direct acces.
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

For more information i have a Bbox, my YunoHost IP is 192.168.1.1 and it’s in DMZ.

Description of my issue

Since one year I have my own YunoHost work perfectly on my network. I never change anything in /etc/hosts or anything like that. It was plug and play.
Since yesterday i have some bad issue with my YunoHost.
I re install it normally and change nothing like the last time i did it.

Problem : I haven’t acces when i’m in “home”. I only have acces in 4G.
And when i broswer 192.168.1.1 i find my admin portal.
But when i try to ssh 192.168.1.1 i obtain this

Could not resolve hostname 192.168.1.1 : No adress associated with hostname.

Find at the end the content of my /etc/hosts files.


:fr: Modèle de message (français)

Mon serveur YunoHost

Matériel: Vieil ordinateur.
Version de YunoHost: 3.7.1.1
J’ai accès à mon serveur : SSH, webadmin, accès direct.

Plus d’information j’ai une Bbox, mon serveur a l’IP 192.168.1.1 et j’ai régler son IP en DMZ.

Description du problème

Depuis 1 an, j’ai mon serveur YunoHost sur ma bbox. Tout marchait normalement. Je n’ai jamais changer quoi que ce soit, ni touché le fichier /etc/hosts.
Hier j’ai du réinstaller mon serveur. J’ai fais exactement comme à chaque fois.Sauf que maintenant j’ai un problème.

Quand je suis sur mon Wifi domestique, je ne peux ni joindre mon serveur, ni synchroniser mon client Nextcloud.
Quand je tape l’adresse 192.168.1.1 j’arrive pour sur la webadmin.
Et en SSH depuis le wifi j’obtiens cela

Could not resolve hostname 192.168.1.1 : No adress associated with hostname.

Pourtant lorsque je bascule en 4G tout marche parfaitement.
Voici ci dessous le contenu du fichier /etc/hosts original avant modification.

127.0.0.1 localhost
127.0.1.1 YunoHost.lan YunoHost

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Merci pour votre aide.
Thanks for your help.

I try to put bellow : 192.168.1.1 mondomaine.tld but i seems don’t work.

Est-ce que tu peux donner la commande ssh exacte que tu tapes

En 4G
ssh admin@mondomaine.tld

En wifi
ssh admin@mondomaine.tld
ou
ssh admin@192.168.1.1 (qui marche lors de l’installation du serveur avant d’installer les certificats du serveur).

Hmokay … Et

ca donne quoi alors ?

(Note que c’est assez etrange de coup de l’IP en 192.168.1.1 … generalement les IPs en .0.1 ou .1.1 correspondent aux routeurs …

Mon routeur est en 192.168.1.254 (par défaut ré initialisation usine il y a peu).
Paserelle : 192.168.1.254.
DHCP 192.168.1.100 à 192.168.1.200
Masque 255.255.255

En 4G je me connecte sans problème en Wifi sa me donne :

Connect to host ankh.gr port 22 : connection refused.

Du coup ca ressemble à fail2ban qui te bannit … En ssh tu devrais regarder tail /var/log/fail2ban.log et regarder comment debannir ton IP avec https://yunohost.org/#/fail2ban

Justement suite à ma demande hier soir sur le chat j’ai fais cette commande
et voilà le résultat

2020-04-13 21:49:43,550 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 21:49:43,553 fail2ban.filter [1159]: INFO [pam-generic] Found 183.82.1.45
2020-04-13 21:49:43,554 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 21:49:45,008 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 21:56:08,899 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 21:56:08,902 fail2ban.filter [1159]: INFO [pam-generic] Found 183.82.1.45
2020-04-13 21:56:08,904 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 21:56:10,211 fail2ban.filter [1159]: INFO [sshd] Found 183.82.1.45
2020-04-13 22:17:15,204 fail2ban.filter [1159]: INFO [pam-generic] Found 80.214.26.211
2020-04-13 22:17:15,206 fail2ban.filter [1159]: INFO [sshd] Found 80.214.26.211

EDIT : Depuis la webadmin je vois cela :

2020-04-13 22:41:10,641 fail2ban.actions [1180]: NOTICE [nextcloud] Ban 192.168.1.254

Depuis hier je tente de synchroniser 1TO de donnée en local mais lorsque je veux unban l’IP il me dit :
2020-04-13 22:41:10,641 fail2ban.actions [1180]: NOTICE [nextcloud] Ban 192.168.1.254
2020-04-13 22:41:10,643 fail2ban.filter [1180]: INFO [recidive] Found 192.168.1.254
2020-04-13 22:41:11,400 fail2ban.filter [1180]: INFO [nextcloud] Found 192.168.1.254
2020-04-13 22:43:54,818 fail2ban.filter [1180]: INFO [pam-generic] Found 80.215.102.209
2020-04-13 22:43:54,825 fail2ban.filter [1180]: INFO [sshd] Found 80.215.102.209
2020-04-13 22:44:00,976 fail2ban.transmitter [1180]: WARNING Command [‘set’, ‘recidive’, ‘unbanip’, ‘192.168.1.254’] has failed. Received ValueError(‘IP 192.168.1.254 is not banned’,)
2020-04-13 22:44:06,471 fail2ban.transmitter [1180]: WARNING Command [‘set’, ‘recidive’, ‘unbanip’, ‘192.168.1.254’] has failed. Received ValueError(‘IP 192.168.1.254 is not banned’,)
2020-04-13 22:44:14,216 fail2ban.transmitter [1180]: WARNING Command [‘set’, ‘sshd’, ‘unbanip’, ‘192.168.1.254’] has failed. Received ValueError(‘IP 192.168.1.254 is not banned’,)

EDIT 2 : Pourtant en arrêtant le service, tout repart comme il faut :cry:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.