Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 11/09/2017, à 15:47

weds

C'est quoi sasl?

Bonjour,
J'ai un serveur avec apache, postfix... tout marche bien, pour l'instant...
J'ai tout le temps ce genre de choses dans mail.log:

Sep 11 15:56:21 batipos postfix/smtpd[5700]: warning: hostname static.kpn.net does not resolve to address 31.149.66.65: No address associated with hostname
Sep 11 15:56:21 batipos postfix/smtpd[5700]: warning: unknown[31.149.66.65]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:00:12 batipos postfix/smtpd[5956]: warning: unknown[187.53.56.107]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:02:46 batipos postfix/smtpd[6129]: warning: unknown[178.152.112.216]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:06:11 batipos postfix/smtpd[6358]: warning: hostname ip-187.94.111-100.globalwave.com.br does not resolve to address 187.94.111.100: No address associated with hostname
Sep 11 16:06:12 batipos postfix/smtpd[6358]: warning: unknown[187.94.111.100]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:09:26 batipos postfix/smtpd[6620]: warning: 162.red-212-170-109.staticip.rima-tde.net[212.170.109.162]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:12:31 batipos postfix/smtpd[6824]: warning: unknown[186.96.92.210]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:15:40 batipos postfix/smtpd[7037]: warning: hostname 213-159-251-144.dynamic.vega-ua.net does not resolve to address 213.159.251.144: No address associated with hostname
Sep 11 16:19:04 batipos postfix/smtpd[7285]: warning: unknown[189.207.84.203]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:22:17 batipos postfix/smtpd[7500]: warning: hostname hwvps150668.hostwindsdns.com does not resolve to address 104.168.142.59
Sep 11 16:22:17 batipos postfix/smtpd[7500]: warning: unknown[104.168.142.59]: SASL LOGIN authentication failed: Invalid authentication mechanism
Sep 11 16:25:42 batipos postfix/smtpd[7726]: warning: 32-60-190-109.dsl.ovh.fr[109.190.60.32]: SASL LOGIN authentication failed: Invalid authentication mechanism

Fail2ban bloque tout ça allégrement et je ne suis pas trop inquiet.
Moi, quand je relève mes mails, j'ai une connexion dovecot: pop3-login: Login etc... Pas sasl.

Je ne comprends pas bien quel est ce protocole de connexion qui intéresse tant de monde robotique pour entrer dans ma machine, wikipedia n'est pas très explicite et mes recherches ne répondent pas simplement, ce n'est peut-être pas simple?


ubuntu 20.04 LTS sur hp Probook
Debian Buster sur hp Zbook
raspbian (Buster), raspberry pi, serveur web, mail...

Hors ligne

#2 Le 11/09/2017, à 20:20

koshieIsYourDaddy

Re : C'est quoi sasl?

Salut,

Déjà si Fail2Ban bloque les tentatives intempestive ça va.

Ensuite, du peu que mes recherches m'ont apporté, c'est juste un protocole d'identification... En gros, quelqu'un tente de se connecter à ton serveur et se plante dans l'identification. Fort à parier que c'est un utilisateur tel que root, postmaster, admin (les logs t'en diront plus à ce sujet).

Donc une authentification SALS échoue, point tongue.

J'espère que je ne me trompe pas et que ça a pu t'éclairer.

koshicalement

Hors ligne

#3 Le 12/09/2017, à 08:55

weds

Re : C'est quoi sasl?

Merci pour cette réponse,
Voici les bannissements:

 ~ $ sudo fail2ban-client status sasl
Status for the jail: sasl
|- filter
|  |- File list:	/var/log/mail.log 
|  |- Currently failed:	37
|  `- Total failed:	229
`- action
   |- Currently banned:	58
   |  `- IP list:	189.207.84.203 187.126.237.55 190.60.102.194 112.74.112.183 52.169.124.146 79.148.239.246 186.96.92.210 105.174.2.98 91.112.238.10 154.127.113.158 201.99.102.86 201.23.111.50 187.53.56.107 212.170.109.162 120.151.198.116 186.177.85.146 184.68.174.154 41.226.11.226 109.7.36.118 116.93.12.194 189.207.186.28 82.200.161.226 223.27.48.229 185.195.39.32 118.201.51.138 93.207.55.151 95.70.169.69 12.130.172.232 177.135.97.250 104.168.142.59 189.59.68.50 123.56.151.114 220.130.130.26 190.181.30.105 190.128.236.18 83.240.191.86 186.10.28.74 213.159.251.144 31.149.66.65 179.127.4.74 171.100.2.18 45.64.98.149 186.138.39.129 192.95.49.162 178.152.112.216 179.236.248.249 187.94.111.100 191.184.105.119 59.100.16.223 110.175.112.118 41.204.40.210 41.180.72.44 190.156.248.62 190.60.122.229 190.171.239.131 200.5.228.122 14.177.236.10 213.30.6.251 
   `- Total banned:	58

J'ai fait un reboot hier, ça fait pas mal de triples tentatives échouées en moins de 24h.
Je ne vois pas dans les logs quel utilisateur est utilisé.
Je suis un peu paumé avec les protocoles mail, TLS, SASL, quelle différence?
Je me demande, dans le main.cf de postfix, que ce passe t-il si je passe cette ligne à no?

smtpd_sasl_auth_enable = yes

J'ai bien peur de ne plus recevoir de mail ou ne plus pouvoir les lire.
Je me demande aussi s'il s'agit vraiment là d'attaques de vilains pirates et si tous les serveurs y sont soumis de cette façon?


ubuntu 20.04 LTS sur hp Probook
Debian Buster sur hp Zbook
raspbian (Buster), raspberry pi, serveur web, mail...

Hors ligne

#4 Le 12/09/2017, à 14:06

bruno

Re : C'est quoi sasl?

Bonjour,

SASL et TLS ne sont pas des protocoles spécifiques au mail.

SASL est un protocole d'authentification (nom d'utilisateur, mot de passe) il fonctionne généralement avec des rpotocoles d'envoi ou de recpetion de messages (SMTP, IMAP, POP, XMPP, etc.)

TLS est un protocole de chiffrement. C'est grâce à TLS que les données circulent de manière chiffrée entre le client et le serveur. TLS est très largement utilisé pour le mail et le web (HTTPS) notamment.

Si tu utilises SASL c'est que tu as besoin de faire du SMTP authentifié. Autrement dit, pour qu'un client (non autorisé par la directive mynetworks de Postfix) puisse utiliser ton serveur pour envoyer des courriels il doit s'authentifier avec un nom d'utilisateur et un mot de passe.

Tu utilises TLS pour que les données transitant par ton client/serveur SMTP soient chiffrées si possible.

Dernière modification par bruno (Le 13/09/2017, à 08:54)

Hors ligne

#5 Le 12/09/2017, à 15:47

koshieIsYourDaddy

Re : C'est quoi sasl?

weds a écrit :

Je me demande, dans le main.cf de postfix, que ce passe t-il si je passe cette ligne à no?

smtpd_sasl_auth_enable = yes

http://www.postfix.org/postconf.5.html a écrit :

    Enable SASL authentication in the Postfix SMTP server. By default, the Postfix SMTP server does not use authentication.

    If a remote SMTP client is authenticated, the permit_sasl_authenticated access restriction can be used to permit relay access, like this:

        # With Postfix 2.10 and later, the mail relay policy is
        # preferably specified under smtpd_relay_restrictions.
        smtpd_relay_restrictions =
            permit_mynetworks, permit_sasl_authenticated, ...

        # With Postfix before 2.10, the relay policy can be
        # specified only under smtpd_recipient_restrictions.
        smtpd_recipient_restrictions =
            permit_mynetworks, permit_sasl_authenticated, ...

    To reject all SMTP connections from unauthenticated clients, specify "smtpd_delay_reject = yes" (which is the default) and use:

        smtpd_client_restrictions = permit_sasl_authenticated, reject

    See the SASL_README file for SASL configuration and operation details.

Hors ligne

#6 Le 12/09/2017, à 20:56

weds

Re : C'est quoi sasl?

Ok, je vais garder le "yes", merci à vous, c'est plus clair.
J'ai aussi lu cette page.


ubuntu 20.04 LTS sur hp Probook
Debian Buster sur hp Zbook
raspbian (Buster), raspberry pi, serveur web, mail...

Hors ligne

#7 Le 19/09/2017, à 18:21

LeoMajor

Re : C'est quoi sasl?

bonjour,

j'ai une connexion dovecot

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot

smtpd_sasl_type = cyrus fonctionne aussi, mais complique les configurations. dovecot sera juste utilisé pour l'AUTHentification  pop/imap

NB: smtpd_sasl_type = dovecot
à remarquer, que cela est la transposition conceptuelle de sasl type cyrus de saslauthd rimap (remote imap), où l'authenticiation smtp est faite sur le remote serveur imap
.
man saslauthd — sasl authentication server

...
    rimap      (All platforms)

                Forward authentication requests to a remote IMAP server. This driver connects to a remote IMAP server,
                specified using the -O flag, and attempts to login (via an IMAP ‘LOGIN’ command) using the credentials sup‐
                plied to the local server. If the remote authentication succeeds the local connection is also considered to
                be authenticated. The remote connection is closed as soon as the tagged response from the ‘LOGIN’ command
                is received from the remote server.

                The option parameter to the -O flag describes the remote server to forward authentication requests to.
                hostname can be a hostname (imap.example.com) or a dotted-quad IP address (192.168.0.1). The latter is use‐
                ful if the remote server is multi-homed and has network interfaces that are unreachable from the local IMAP
                server. The remote host is contacted on the ‘imap’ service port. A non-default port can be specified by
                appending a slash and the port name or number to the hostname argument.

                The -O flag and argument are mandatory when using the rimap mechanism.

Hors ligne