Bonjour
J’ai installé la dernière version YunoHost sur un dell poweredge1850 et je n’ai pas réussi a changé le port 22 du ssh. J’ai pu ajouter un port mais celui n’est pas ouvert quand on scrute les ports su serveur.
La version est de YH :
yunohost 2.6.5
yunohost-admin 2.6.2
moulinette 2.6.1
ssowat 2.6.8
J’ai rajouté un port : 38519
L’ajoute du port a été fait via l’interface web
Si je regarde dans iptables on voit bien le port qui a créé
#iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-yunohost tcp – anywhere anywhere multiport dports http,https
fail2ban-nginx tcp – anywhere anywhere multiport dports http,https
fail2ban-dovecot tcp – anywhere anywhere multiport dports smtp,urd,submission,imap2,imap3,imaps,pop3,pop3s
fail2ban-sasl tcp – anywhere anywhere multiport dports smtp,urd,submission,imap2,imap3,imaps,pop3,pop3s
fail2ban-postfix tcp – anywhere anywhere multiport dports smtp,urd,submission
fail2ban-pam-generic tcp – anywhere anywhere
fail2ban-ssh tcp – anywhere anywhere multiport dports ssh
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp – anywhere anywhere tcp dpt:smtp
ACCEPT tcp – anywhere anywhere tcp dpt:domain
ACCEPT tcp – anywhere anywhere tcp dpt:http
ACCEPT tcp – anywhere anywhere tcp dpt:https
ACCEPT tcp – anywhere anywhere tcp dpt:urd
ACCEPT tcp – anywhere anywhere tcp dpt:submission
ACCEPT tcp – anywhere anywhere tcp dpt:imaps
ACCEPT tcp – anywhere anywhere tcp dpt:xmpp-client
ACCEPT tcp – anywhere anywhere tcp dpt:xmpp-server
ACCEPT tcp – anywhere anywhere tcp dpt:38519
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT udp – anywhere anywhere udp dpt:domain
ACCEPT udp – anywhere anywhere udp dpt:mdns
ACCEPT all – anywhere anywhere
ACCEPT icmp – anywhere anywhere
Chain FORWARD (policy ACCEPT)
target
…
Si on regarde avec la Moulinette de YH on voit bien le port créer
#yunohost firewall list
opened_ports:
- 22
- 25
- 53
- 80
- 443
- 465
- 587
- 993
- 5222
- 5269
- 5353
- 38519
Mais celui n’est pas ouvert : vérification avec nmap en local et à distance
En LOCAL :
$ nmap -p 22 localhost
Starting Nmap 6.47 ( .http://nmap.org ) at 2017-07-29 23:31 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00012s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
$ nmap -p 38519 localhost
Starting Nmap 6.47 ( .http://nmap.org ) at 2017-07-29 23:31 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00013s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
38519/tcp closed unknown
Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
$
A DISTANCE :
#nmap -p 22 jojolapatade.fr
Starting Nmap 5.51.6 ( .http://nmap.org ) at 2017-07-29 23:27 CEST
Nmap scan report for jojolapatade.fr (192.168.1.76)
Host is up (0.00013s latency).
PORT STATE SERVICE
22/tcp open ssh
MAC Address: 00:13:72:50:29:90 (Dell)
Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds
#nmap -p 38519 jojolapatade.fr
Starting Nmap 5.51.6 ( .http://nmap.org ) at 2017-07-29 23:27 CEST
Nmap scan report for jojolapatade.fr (192.168.1.76)
Host is up (0.00016s latency).
PORT STATE SERVICE
38519/tcp closed unknown
MAC Address: 00:13:72:50:29:90 (Dell)
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
Je ne comprends pas pourquoi le port n’as pas ouvert.
Si la box SFR j’ai bien le NAP…
Tant que le port n’est pas ouvert, je ne peux changer le fichier ssh_config.conf pour le changement d’adresse du port.
J’ai quand même modifié ce fichier mais comme le port 38519 n’est pas ouvert je n’ai pas pu avoir une connexion ssh.
Quelqu’un aurait une idée car je suis bloqué.
Merci d’avance
Jonathan