Aide Linux - Liste de diffusion Ze-Linux hebergée par
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [telnet]connexion impossible
Golliet Joel a écrit :
Le 07.03.2007 11:02, HARTZ Gérard a écrit :
Golliet Joel a écrit :
Le 06.03.2007 19:53, HARTZ Gérard a écrit :
Bonjour la liste
Depuis quelque temps je ne peux plus me connecter par telnet, pour mes
tests de l'exterieur, la connexion se fait puis au bout de quelque
temps, j'ai le message suivant :
laptop01:/home/ghartz# telnet mx1.mondomaine.fr 25
On parle de "telnet classique" (port 23 ; prise en main à distance) ou
de service SMTP (port 25) qu'on peut tester par une connexion telnet ?
Ici, visiblement, c'est le SMTP que tu testes.
Trying 81.xxx.xxx.xxx...
telnet: Unable to connect to remote host: Connection timed out
laptop01:/home/ghartz#
un netstat -an me donne ceci , mon port est bien ouvert et à l'écoute
laptop01:/home/ghartz# netstat -an
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 0 127.0.0.1:2208 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:57457 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:41687 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:*
LISTEN
On voit que le serveur écoute bien sur le port 25 mais seulement sur
l'interface "loopback" (adresse en 127.0.0.1) => les connexions qui
arrivent de l'extérieur n'aboutissent pas.
Il faudrait ici que le netstat retourne une entrée avec 0.0.0.0:25 ou
autant d'entrées que tu as d'adresses IP sur ta machine à la place. La
config de ton serveur SMTP est donc à revoir.
Dans postfix (/etc/postfix/main.cf), c'est normalement sur la variable
inet_interfaces qui joue.
Bonjour
suite à ta réponse j'ai encore vérifié mon main.cf et j'ai bien ce qui
suit :
inet_interfaces = all
Il n'empêche que ton serveur n'écoute actuellement que sur son interface
loopback => ça peut pas marcher et le problème ne vient pas de Free...
Sur ton serveur, tu as quoi comme interfaces réseau (combien et dans
quelle config : dhcp ou statique) ?
Localement, sur le serveur, tu dois pouvoir faire les tests de connexion
SMTP en utilisant son adresse IP qu'il a sur son interface réseau. Si
ton serveur est en 192.168.0.2 par exemple, un "telnet 192.168.0.2 25"
devrait te donner le prompt de postfix. Tant que c'est pas le cas, c'est
pas la peine de faire des tests depuis l'extérieur.
Actuellement, seul le "telnet 127.0.0.1 25" doit passer j'imagine.
Y'a forcément quelque chose côté serveur (postfix) je pense... T'as
essayé de redémarrer le service, le serveur complet, ... ?
Que donne la commande "netstat -nlp" pour la partie du haut (Connexions
Internet actives) et un "ps auxwf|grep postfix" ?
Est-ce que ton fichier "main.cf" peut être transmis ici (quitte à
camoufler les infos que tu pourrais ne pas vouloir transmettre) ?
Idem pour ton IP ?
ne serait ce pas un prob du fai free qui bien que j'ai décocher la case
"activer le fitrage smtp" qui poserait prob encore que je les ai appelé
a ce sujet et qu'il me garantissent qu'il n'y a aucun filtre.
ou puis - je regarder d'autre ?
merci
gérard
voila donc mes fichiers
d'abord netstat
ns1:~# netstat -nlp
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
PID/Program name
tcp 0 0 127.0.0.1:2208 0.0.0.0:*
LISTEN 2684/hpiod
tcp 0 0 0.0.0.0:46601 0.0.0.0:*
LISTEN 3183/rpc.statd
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
LISTEN 2772/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:*
LISTEN 3094/smbd
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN 3021/inetd
tcp 0 0 127.0.0.1:45135 0.0.0.0:*
LISTEN 2687/python
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN 2369/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:*
LISTEN 3021/inetd
tcp 0 0 192.168.0.51:53 0.0.0.0:*
LISTEN 2659/named
tcp 0 0 127.0.0.1:53 0.0.0.0:*
LISTEN 2659/named
tcp 0 0 127.0.0.1:631 0.0.0.0:*
LISTEN 2915/cupsd
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN 3083/master
tcp 0 0 127.0.0.1:953 0.0.0.0:*
LISTEN 2659/named
tcp 0 0 0.0.0.0:445 0.0.0.0:*
LISTEN 3094/smbd
tcp6 0 0 :::80 :::*
LISTEN 3284/apache2
tcp6 0 0 :::21 :::*
LISTEN 3240/proftpd: (acce
tcp6 0 0 :::53 :::*
LISTEN 2659/named
tcp6 0 0 :::22 :::*
LISTEN 3126/sshd
tcp6 0 0 :::25 :::*
LISTEN 3083/master
tcp6 0 0 ::1:953 :::*
LISTEN 2659/named
udp 0 0 0.0.0.0:32771
0.0.0.0:* 2659/named
udp 0 0 0.0.0.0:32773
0.0.0.0:* 2990/avahi-daemon:
udp 0 0 0.0.0.0:32774
0.0.0.0:* 3183/rpc.statd
udp 0 0 192.168.0.51:137
0.0.0.0:* 3092/nmbd
udp 0 0 0.0.0.0:137
0.0.0.0:* 3092/nmbd
udp 0 0 192.168.0.51:138
0.0.0.0:* 3092/nmbd
udp 0 0 0.0.0.0:138
0.0.0.0:* 3092/nmbd
udp 0 0 0.0.0.0:815
0.0.0.0:* 3183/rpc.statd
udp 0 0 192.168.0.51:53
0.0.0.0:* 2659/named
udp 0 0 127.0.0.1:53
0.0.0.0:* 2659/named
udp 0 0 0.0.0.0:5353
0.0.0.0:* 2990/avahi-daemon:
udp 0 0 0.0.0.0:111
0.0.0.0:* 2369/portmap
udp 0 0 0.0.0.0:631
0.0.0.0:* 2915/cupsd
udp6 0 0 :::32772
:::* 2659/named
udp6 0 0 :::53
:::* 2659/named
oui un telnet 127.0.0.1 25 fonctionne
puis ...
ns1:~# ps auxwf|grep postfix
root 3083 0.0 0.2 20668 2240 ? Ss 09:06 0:00
/usr/lib/postfix/master
postfix 3090 0.0 0.2 20692 2120 ? S 09:06 0:00 \_
qmgr -l -t fifo -u
postfix 4899 0.0 0.2 21728 2400 ? S 16:00 0:00 \_
tlsmgr -l -t unix -u -c
postfix 5023 0.0 0.1 20652 1992 ? S 17:23 0:00 \_
pickup -l -t fifo -u -c
postfix 5865 0.0 0.3 33672 3440 ? S 18:24 0:00 \_
smtpd -n smtp -t inet -u -c -s 2
postfix 5866 0.0 0.1 20652 2008 ? S 18:24 0:00 \_
proxymap -t unix -u
root 5870 0.0 0.0 3956 712 pts/0 D+ 18:26
0:00 \_ grep postfix
Voici une copie de main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mondomaine.fr, mx1.mondomaine.fr,
localhost.mondomaine.fr, localhost
relayhost =
mynetworks = 127.0.0.0/8 192.0.0.0/16
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# virtuals domains
virtual_alias_domains = autredomaine.fr
virtual_alias_maps = hash:/etc/postfix/virtual
# sasl parameters
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
voila pour résumer un telnet de l'interieur ok mais de l'extérieur niet
pas de firewall pourtant !
a plus
gérard
----------------------------------
Informations, désabonnement, règles, obligations sur la liste Aide-Linux :
http://lists.ze-linux.org/howto_ml.html
Liste Herbergee par Over-Link [http://www.over-link.net]
----------------------------------
Annonces immobilieres, auto, moto ... http://www.uneannonce.fr
Aide Linux - Liste de diffusion Ze-Linux hebergée par