Iptable ouvrir les ports

Bonjour,

Sur mon serveur domestique debian squeeze de ma Dreamplug, j’ai besoin d’avoir accès a mon serveur depuis internet avec mon adresse ip DNS “http://mon.adresse.dns.fr” qui pointe sur mon adresse ip fixe de mon fai.

J’ai particulièrement besoin d’avoir accès à :
1/ mon site web —> /var/www
2/ Asterisk pour un accès en exterieur avec Ekiga

Quand je tape dans le navigateur “http://mon.adresse.dns.fr:80” ou “http://monadresseip:80” j’ai une erreur 404.
Pour asterisk Ekiga me dit qu’il ne trouve pas asterisk.

Comment dois je procéder pour ouvrir les ports ?

Merci.

Bonjour,

je présume que tu es connecté à Internet par une box routeur. Si c’est le cas, il te faut faire du transfert de port dans la box, souvent accessible par une page web.

Bonjour,

j’ai suivi ce tuto —> installation-parefeu-iptables-pour-les-nuls-t1901.html
Voila ce que j’ai fait :

root@debian:~# touch /etc/init.d/mon_parefeu
root@debian:~# chmod +x /etc/init.d/mon_parefeu
root@debian:~# /etc/init.d/mon_parefeu clean
root@debian:~# iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
root@debian:~# iptables -A INPUT -p tcp -m tcp --dport 631 -j ACCEPT
root@debian:~# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
root@debian:~# /etc/init.d/mon_parefeu stop
serveur@debian:~$ ls /etc/rcS.d | grep S**networking
S13networking
serveur@debian:~$ ls /etc/rc0.d | grep K**networking
K06networking
serveur@debian:~$
root@debian:~# update-rc.d mon_parefeu start 12 S . stop 07 0 6 .
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: mon_parefeu start runlevel arguments (S) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: mon_parefeu stop runlevel arguments (0 6) do not match LSB Default-Stop values (0 1 6)
root@debian:~# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
root@debian:~# iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
root@debian:~# iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
root@debian:~#

Mais c’est toujours pareil je n’arrive pas a me connecter a mon serveur depuis l’extérieur.
Mon fai est Free, le routeur de la freebox est configurer avec les ports dirigé vers l’ip de mon serveur. Les port son bien ouvert dans la freebox.
Même après avoir rebooter mon serveur ca marche pas ?

Merci.

L’erreur 404 est retournée à ton navigateur par un serveur web. En conséquence, si tu obtiens une erreur 404 ce n’est pas dû à un pare-feu qui bloque tes requêtes.

Accède-tu à ton site web depuis le réseau local ? Regarde plutôt dans la configuration de ton serveur web (apache, nginx, etc).

Par ailleurs pour valider le bon fonctionnement du réseau effectue la commande suivante sur ton serveur puis essaye de te connecter sur ton site web depuis le WAN (coté Internet) :

tcpdump -i eth0 port 80
  • Pense à adapter “eth0” au nom de l’interface réseau par laquelle ta requête web doit arriver (wlan0,eth0,eth1,…)

Bonsoir,

j’ai essayer aussi d’ouvrir le port tcp 80 directement

# iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT pareil.

Oui je vois mon site en local via —> 192.168.0.1/
Quel son les non des fichiers a regarder

votre commande me retourne les connections en local mais pas depuis l’extérieur :

root@debian:~# tcpdump -i eth0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
22:03:24.589388 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [S], seq 3056877494, win 14600, options [mss 1460,sackOK,TS val 18701951 ecr 0,nop,wscale 7], length 0
22:03:24.589534 IP 192.168.0.1.www > 192.168.0.2.38506: Flags [S.], seq 1860895778, ack 3056877495, win 14480, options [mss 1460,sackOK,TS val 1346068 ecr 18701951,nop,wscale 5], length 0
22:03:24.589841 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [.], ack 1, win 115, options [nop,nop,TS val 18701952 ecr 1346068], length 0
22:03:24.590089 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [P.], seq 1:424, ack 1, win 115, options [nop,nop,TS val 18701952 ecr 1346068], length 423
22:03:24.590208 IP 192.168.0.1.www > 192.168.0.2.38506: Flags [.], ack 424, win 486, options [nop,nop,TS val 1346068 ecr 18701952], length 0
22:03:24.594097 IP 192.168.0.1.www > 192.168.0.2.38506: Flags [P.], seq 1:211, ack 424, win 486, options [nop,nop,TS val 1346068 ecr 18701952], length 210
22:03:24.594253 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [.], ack 211, win 123, options [nop,nop,TS val 18701956 ecr 1346068], length 0
22:03:39.594567 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [F.], seq 424, ack 211, win 123, options [nop,nop,TS val 18716956 ecr 1346068], length 0
22:03:39.595037 IP 192.168.0.1.www > 192.168.0.2.38506: Flags [F.], seq 211, ack 425, win 486, options [nop,nop,TS val 1347568 ecr 18716956], length 0
22:03:39.595288 IP 192.168.0.2.38506 > 192.168.0.1.www: Flags [.], ack 212, win 123, options [nop,nop,TS val 18716957 ecr 1347568], length 0

La je ne comprend pas ce que vous voulez dire ?
Je suis sur cable réseau RJ45 sur Eth0.
Merci

Tu as une erreur 404 depuis ton navigateur lors tu accède au serveur depuis le WAN ?

bonsoir

c’est quoi le WAN ???

Merci

C’est l’extérieur de ton réseau local (Internet).

Bonsoir,

Mais je ne comprend toujours comment je doit résoudre le probleme ?

Merci.

Tant que tu ne me dira pas si OUI ou NON tu as une ERREUR 404 qui s’affiche lorsque tu accède à ton serveur depuis INTERNET, je ne peux pas savoir si tu rencontre un problème réseau ou pas.

Bonsoir,

Depuis une autre connection internet j’ai une erreur 404 monadresseip:80
En local ca marche 127.0.0.1

root@debian:~# iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     udp  --  anywhere             anywhere            udp dpt:sip
ACCEPT     udp  --  anywhere             anywhere            udp dpts:10000:20000
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:sip
ACCEPT     udp  --  anywhere             anywhere            udp dpt:sip

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
root@debian:~#

Merci.

Si le serveur ne reçoit rien lors d’une tentative de connexion depuis l’extérieur, alors le problème se situe probablement au niveau de la box.

Et inutile de jouer avec iptables, qui ne sert qu’à bloquer des paquets et non à “ouvrir des ports”. Pas d’iptables = pas de blocage. Bon sang, mais qu’est-ce qu’ils ont tous à tripoter iptables dès qu’il y a un problème réseau ?

Bonsoir,

Je ne pense pas que ce la est du à la Freebox

Configuration du routeur de la freebox

Redirections / Baux DHCP
PORT EXTERNE 	PROTOCOLE 	IP DE DESTINATION 	PORT INTERNE
  80 - TCP - 192.168.0.1 - 80 
5060 - UDP - 192.168.0.1 - 5060
  22 - TCP - 192.168.0.1 - 22 

Mon serveur sous microsft Windows xp que je transfert sur debian fonctionne parfaitement avec la box configurer comme ceci.
Par contre pour la connection ssh ca marche depuis que j’ai ouvert le port sur le router de la freebox
le pare-feu qui pose pb ?

Edit 11/05/12 à 14h30
J’ai constaté que ca mache quand je fait monip
Pourquoi ?

Test effectuer sur le poste 192.168.0.2 pardon

[root@localhost laurent]# wget 192.168.0.1
 --2012-05-11 15:07:42--  http://192.168.0.1/
 Connexion vers 192.168.0.1:80...connecté.
 requête HTTP transmise, en attente de la réponse...200 OK
 Longueur: 177 [text/html]
 Sauvegarde en : «index.html»
 100%[=================================================================================================>] 177         --.-K/s   ds 0s
 2012-05-11 15:07:42 (35,5 MB/s) - «index.html» sauvegardé [177/177]
 [root@localhost laurent]#

en LAN ca fonctionne
c’est donc entre l’interco en LAN et WAN que ca chie
Haaaaaa, j’ai besoin d’un autre café !

Merci.

NON ce n’est pas entre l’interco LAN et WAN puisque tu as une erreur 404 retourné par ton serveur WEB ! Tu n’as donc pas de problème réseau.. Cela provient de la configuration de ton serveur WEB.

Regarde dans le fichier de configuration de ton serveur, il doit y avoir une restriction empêchant l’accès pour les réseaux autres que le réseau local.

Edité le 12/05/2012 à 12h07

bonjour,

Ce n’est pas une erreur 404, c’est entre l’interco en LAN et WAN que ca merde.
Il y un problème que je ne comprend pas ?
Impossible d’accéder a mon site web depuis l’extérieur sur le port 80 alors que la connexion ssh fonctionne depuis l’extérieur sur le port 22 et en local tout fonctionne ???
monipprivé:80
monadressednsprivé:80

la configuration du routeur de la freebox :

Redirections / Baux DHCP
PORT EXTERNE    PROTOCOLE    IP DE DESTINATION    PORT INTERNE
  80 - TCP - 192.168.0.1 - 80
5060 - UDP - 192.168.0.1 - 5060
  22 - TCP - 192.168.0.1 - 22

j’ai exactement le même problème avec Asterisk sur le port 5060 en extérieur ?

la commande “tcpdump -i eth0 port 80” n’affiche rien depuis une connexion de l’extérieur et fonctionne en local.

root@debian:~# tcpdump -i eth0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root@debian:~#

Quand je tape dans le navigateur monipprivé depuis une autre connexion internet le navigateur m’affiche :

La connexion a échoué
Firefox ne peut établir de connexion avec le serveur à l'adresse monipprivé.
        
Le site est peut-être temporairement indisponible ou surchargé. Réessayez plus
    tard ;
  Si vous n'arrivez à naviguer sur aucun site, vérifiez la connexion
    au réseau de votre ordinateur ;
  Si votre ordinateur ou votre réseau est protégé par un pare-feu ou un proxy,
    assurez-vous que Firefox est autorisé à accéder au Web.
[root@localhost laurent]# wget monipprivé
--2012-05-12 10:45:13--  http://monipprivé/
Connexion vers monipprivé...échec: Aucun chemin d'accès pour atteindre l'hôte cible.
[root@localhost laurent]# wget monadressednsprivé
--2012-05-12 10:45:52--  http://monadressednsprivé/
Résolution de monadressednsprivé (monadressednsprivé)... monipprivé
Connexion vers monadressednsprivé (monadressednsprivé)|monipprivé|:80...échec: Aucun chemin d'accès pour atteindre l'hôte cible.
[root@localhost laurent]#
root@debian:~# iptables -v -L
Chain INPUT (policy ACCEPT 1148 packets, 340K bytes)
 pkts bytes target     prot opt in     out     source               destination
1218K   64M ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:ssh
    6   360 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:ipp
   64  8794 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:www
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:www
50624 4109K ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:sip
  130 26000 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpts:10000:20000
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:www
    1    60 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:sip
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:sip

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 2573K packets, 846M bytes)
 pkts bytes target     prot opt in     out     source               destination
root@debian:~#
root@debian:~# iptables-save
# Generated by iptables-save v1.4.8 on Sat May 12 11:57:00 2012
*raw
:PREROUTING ACCEPT [8710:588037]
:OUTPUT ACCEPT [694:119267]
COMMIT
# Completed on Sat May 12 11:57:00 2012
# Generated by iptables-save v1.4.8 on Sat May 12 11:57:00 2012
*mangle
:PREROUTING ACCEPT [8722:588661]
:INPUT ACCEPT [8722:588661]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [706:120611]
:POSTROUTING ACCEPT [741:125276]
COMMIT
# Completed on Sat May 12 11:57:00 2012
# Generated by iptables-save v1.4.8 on Sat May 12 11:57:00 2012
*nat
:PREROUTING ACCEPT [35:5397]
:INPUT ACCEPT [35:5397]
:OUTPUT ACCEPT [36:4297]
:POSTROUTING ACCEPT [36:4297]
COMMIT
# Completed on Sat May 12 11:57:00 2012
# Generated by iptables-save v1.4.8 on Sat May 12 11:57:00 2012
*filter
:INPUT ACCEPT [308:38235]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [730:123580]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p udp -m udp --dport 5060 -j ACCEPT
-A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -p udp -m udp --dport 5060 -j ACCEPT
COMMIT
# Completed on Sat May 12 11:57:00 2012
root@debian:~#
root@debian:~# netstat -pan|grep 80
tcp6       0      0 :::80                   :::*                    LISTEN      1206/apache2
udp6       0      0 fe80::f2ad:4eff:fe0:123 :::*                                1322/ntpd
root@debian:~#
root@debian:~# grep -ri listen /etc/apache2/*
 /etc/apache2/ports.conf:Listen 80
/etc/apache2/ports.conf:    Listen 443
/etc/apache2/ports.conf:    Listen 443
root@debian:~#
root@debian:~# netstat -nplt |grep apache
tcp6       0      0 :::80                   :::*                    LISTEN      1206/apache2
root@debian:~#
root@debian:~# ''sysctl net.ipv6.bindv6only''
net.ipv6.bindv6only = 0
root@debian:~#
[root@localhost laurent]# ping -c 4 78.xxx.xx.xx
PING 78.xxx.xx.xx (78.xxx.xx.xx) 56(84) bytes of data.
64 bytes from 78.xxx.xx.xx: icmp_req=1 ttl=64 time=0.894 ms
64 bytes from 78.xxx.xx.xx: icmp_req=2 ttl=64 time=0.993 ms
64 bytes from 78.xxx.xx.xx: icmp_req=3 ttl=64 time=0.921 ms
64 bytes from 78.xxx.xx.xx: icmp_req=4 ttl=64 time=0.949 ms

--- 78.xxx.xx.xx ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.939/0.991/1.060/0.058 ms
[root@localhost laurent]#

“tcpdump -i eth0 port 80” n’affiche rien quand je fait un ping sur le port 80

[root@localhost laurent]# ping -c 4 -p 80 78.xxx.xx.xx
PATTERN: 0x80
PING 78.xxx.xx.xx (78.xxx.xx.xx) 56(84) bytes of data.
64 bytes from 78.xxx.xx.xx: icmp_req=1 ttl=64 time=0.894 ms
64 bytes from 78.xxx.xx.xx: icmp_req=2 ttl=64 time=0.993 ms
64 bytes from 78.xxx.xx.xx: icmp_req=3 ttl=64 time=0.921 ms
64 bytes from 78.xxx.xx.xx: icmp_req=4 ttl=64 time=0.949 ms

--- 78.xxx.xx.xxx ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.894/0.939/0.993/0.042 ms
[root@localhost laurent]#
[root@localhost laurent]# nmap -p 80 78.xxx.xx.xx

Starting Nmap 5.51 ( http://nmap.org ) at 2012-05-12 13:14 CEST
Nmap scan report for tou83-1-78-xxx-xx-xxx.fbx.proxad.net (78.xxx.xx.xx)
Host is up (0.0012s latency).
PORT   STATE    SERVICE
80/tcp filtered http

Nmap done: 1 IP address (1 host up) scanned in 0.38 seconds
[root@localhost laurent]

Merci.

La notion de port n’est pas pertinente avec le ping ICMP. L’option -p, comme on peut le voir, ne spécifie par le port mais le motif de données à émettre. Utilise plutôt tcptraceroute depuis l’extérieur, en comparant le résultat pour les ports 80 et 22 (avec tcpdump en écoute sur le serveur, sans restriction de protocole/port).

Note : le port 443 n’est pas redirigé dans la box, je ne vois pas comment l’accès en HTTPS peut marcher depuis l’extérieur.

On est bien d’accord : “depuis l’extérieur” signifie bien depuis une machine située de l’autre côté de la box ?

bonjour,

Oui c’est bien ca depuis une connexion internet.

la configuration du routeur de la freebox : ajout du port tcp 443

Redirections / Baux DHCP
PORT EXTERNE    PROTOCOLE    IP DE DESTINATION    PORT INTERNE
  80 - TCP - 192.168.0.1 - 80
5060 - UDP - 192.168.0.1 - 5060
  22 - TCP - 192.168.0.1 - 22
 443 - TCP - 192.168.0.1 - 443

j’ai donc rediriger le port 443 dans la freebox sur l’ip du serveur, mais ca marche tjr pas depuis l’exterieur.

Port 80

[root@localhost laurent]# traceroute -p 80 78.xxx.xx.xxx
traceroute to 78.xxx.xx.xxx (78.xxx.xx.xxx), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
[root@localhost laurent]#

“tcpdump -i eth0 port 80” n’a rien affiché ?

root@debian:~# tcpdump -i eth0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root@debian:~# 

Port 22

[root@localhost laurent]# traceroute -p 22 78.xxx.xx.xxx
traceroute to 78.xxx.xx.xxx (78.xxx.xx.xxx), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  tou83-1-78-xxx-xx-xxx.fbx.proxad.net (78.xxx.xx.xxx)  5.463 ms * *
[root@localhost laurent]#
root@debian:~# tcpdump -i eth0 port 22 > tcpdump-test
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C9 packets captured
11 packets received by filter
0 packets dropped by kernel
root@debian:~#
root@debian:~# cat tcpdump-test
14:20:00.061858 IP 192.168.0.1.ssh > 192.168.0.2.45013: Flags [P.], seq 677268191:677268303, ack 325840660, win 953, options [nop,nop,TS val 1129056 ecr 15251230], length 112
14:20:00.062134 IP 192.168.0.2.45013 > 192.168.0.1.ssh: Flags [.], ack 112, win 501, options [nop,nop,TS val 15251303 ecr 1129056], length 0
14:20:00.062188 IP 192.168.0.1.ssh > 192.168.0.2.45013: Flags [P.], seq 112:160, ack 1, win 953, options [nop,nop,TS val 1129056 ecr 15251230], length 48
14:20:00.062439 IP 192.168.0.2.45013 > 192.168.0.1.ssh: Flags [.], ack 160, win 501, options [nop,nop,TS val 15251303 ecr 1129056], length 0
14:20:00.062546 IP 192.168.0.1.ssh > 192.168.0.2.45013: Flags [P.], seq 160:272, ack 1, win 953, options [nop,nop,TS val 1129056 ecr 15251303], length 112
14:20:00.062767 IP 192.168.0.2.45013 > 192.168.0.1.ssh: Flags [.], ack 272, win 501, options [nop,nop,TS val 15251303 ecr 1129056], length 0
14:20:00.062806 IP 192.168.0.1.ssh > 192.168.0.2.45013: Flags [P.], seq 272:320, ack 1, win 953, options [nop,nop,TS val 1129056 ecr 15251303], length 48
14:20:00.063057 IP 192.168.0.2.45013 > 192.168.0.1.ssh: Flags [.], ack 320, win 501, options [nop,nop,TS val 15251303 ecr 1129056], length 0
14:20:18.809585 IP 192.168.0.2.45013 > 192.168.0.1.ssh: Flags [P.], seq 1:49, ack 320, win 501, options [nop,nop,TS val 15270050 ecr 1129056], length 48

root@debian:~#

Merci.

  1. J’avais demandé un tcptraceroute (traceroute TCP), pas le traceroute UDP habituel.
  2. J’avais demandé à ne pas limiter tcpdump à un protocole ou un port. J’ajoute -n pour avoir les valeurs numériques d’adresses et de ports, sans résolution inverse.
  3. 5 ms de RTT, c’est vachement court pour de l’ADSL. C’est de la fibre ?

Tu n’avais pas écrit que l’accès marchait en HTTPS depuis l’extérieur ?

Bonjour,

Depuis un autre connexion internet

[root@localhost laurent]# tcptraceroute 78.xxx.xx.xxx 80
Selected device eth0, address 192.168.0.2, port 60612 for outgoing packets
Tracing the path to 78.xxx.xx.xxx on TCP port 80 (www), 30 hops max
 1  tou83-1-78-xxx-xxx-xxx.fbx.proxad.net (78.xxx.xx.xxx)  0.908 ms  2.965 ms  0.890 ms
 2  * tou83-1-xxx-xxx-xx-xxx.fbx.proxad.net (78.xxx.xx.xxx) 2.970 ms !H  3002.441 ms !H
[root@localhost laurent]#
[root@localhost laurent]# tcptraceroute 78.xxx.xx.xxx 22
Selected device eth0, address 192.168.0.2, port 33957 for outgoing packets
Tracing the path to 78.xxx.xx.xxx on TCP port 22 (ssh), 30 hops max
 1  tou83-1-78-xxx-xxx-xxx.fbx.proxad.net (78.xxx.xx.xxx)  1.087 ms  0.845 ms  0.790 ms
 2  tou83-1-78-xxx-xxx-xxx.fbx.proxad.net (78.xxx.xx.xxx) [open]  1.815 ms  1.647 ms  1.488 ms
[root@localhost laurent]#
root@debian:~# tcpdump -n -i eth0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root@debian:~# 
root@debian:~# tcpdump -n -i eth0 port 22 > tcpdump-test
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C9 packets captured
11 packets received by filter
0 packets dropped by kernel
root@debian:~#
root@debian:~# cat  tcpdump-test
17:27:37.576499 IP 192.168.0.1.22 > 192.168.0.2.45013: Flags [P.], seq 683810479:683810591, ack 325849412, win 953, options [nop,nop,TS val 2254808 ecr 26508525], length 112
17:27:37.576766 IP 192.168.0.1.22 > 192.168.0.2.45013: Flags [P.], seq 112:160, ack 1, win 953, options [nop,nop,TS val 2254808 ecr 26508525], length 48
17:27:37.576831 IP 192.168.0.2.45013 > 192.168.0.1.22: Flags [.], ack 112, win 501, options [nop,nop,TS val 26508593 ecr 2254808], length 0
17:27:37.576893 IP 192.168.0.2.45013 > 192.168.0.1.22: Flags [.], ack 160, win 501, options [nop,nop,TS val 26508593 ecr 2254808], length 0
17:27:37.577192 IP 192.168.0.1.22 > 192.168.0.2.45013: Flags [P.], seq 160:272, ack 1, win 953, options [nop,nop,TS val 2254808 ecr 26508593], length 112
17:27:37.577409 IP 192.168.0.1.22 > 192.168.0.2.45013: Flags [P.], seq 272:320, ack 1, win 953, options [nop,nop,TS val 2254808 ecr 26508593], length 48
17:27:37.577483 IP 192.168.0.2.45013 > 192.168.0.1.22: Flags [.], ack 272, win 501, options [nop,nop,TS val 26508594 ecr 2254808], length 0
17:27:37.577531 IP 192.168.0.2.45013 > 192.168.0.1.22: Flags [.], ack 320, win 501, options [nop,nop,TS val 26508594 ecr 2254808], length 0
17:27:50.804537 IP 192.168.0.2.45013 > 192.168.0.1.22: Flags [P.], seq 1:49, ack 320, win 501, options [nop,nop,TS val 26521821 ecr 2254808], length 48

root@debian:~#

Si les commandes ne son pas bonne dite moi quoi taper

oui, mais c’est une erreur de manip entre poste, en vérité ca marche pas.

Merci.

Le résultat des tcptraceroute ne ressemble pas à ce qu’on obtient depuis une autre connexion internet mais plutôt depuis une machine située derrière la même box que le serveur.

Dans le premier cas, !H (host unreachable) signifie que l’adresse du prochain saut n’a pas répondu aux requêtes ARP. Typiquement, l’adresse cible configurée dans la redirection de port de la box n’appartient pas à une machine active.

J’avais demandé aucun filtrage de port/protocole avec tcpdump, donc sans “port xx”, afin notamment de capturer les requêtes ARP le cas échéant.