Forum Linux.debian/ubuntu Problème NAT et warcraft 3

Posté par  .
Étiquettes : aucune
0
1
oct.
2004
Alors voilà, je m'explique.

J'ai 2 ordis: un portable sous WinXP (@IP = 192.168.0.44) qui est branché en réseau tout ce qui a de plus standard (ethernet 100 Mb/s) via un switch à un ordi fixe sous linux (Debian Sid noyau 2.6.8) (@IP1=192.168.0.1).

L'ordi fixe a une 2e carte reseau et est branché à un autre reseau (on l'appellera LAN 2 par exemple).

J'ai mis en place des règles de forwarding avec iptables et NAT en utilisant la config de De Lattre.


J'arrive à avoir le web sur le portable.

Le problème est le suivant:
Quand je créé une partie warcraft 3 sur le portable, on ne la voit sur LAN 2. Meme chose quand on créé une partie sur LAN 2: je ne la voit pas depuis le portable.

J'ai fait quelques tests: quand je créé une partie sur le portable, il m'est possible de m'y connecter avec telnet depuis LAN 2.

Voici le résultat d'un [i]iptables -v -L[/i]:


Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
7512 685K ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT icmp -- any any anywhere anywhere
106 2968 ACCEPT igmp -- any any anywhere anywhere
21439 9639K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ftp-data
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ftp
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:netbios-ssn
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:netbios-ssn
2716 120K ACCEPT udp -- any any anywhere anywhere udp dpt:6112
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6112
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6113
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6113
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6114
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6114
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6115
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6115
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6116
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6116
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6117
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6117
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6118
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6118
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:6119
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:6119
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:4000
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:4000
10279 1366K REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable

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

Chain OUTPUT (policy ACCEPT 27030 packets, 2288K bytes)
pkts bytes target prot opt in out source destination



Et le résultat d'un iptables -v -L -t nat


Chain PREROUTING (policy ACCEPT 26273 packets, 2542K bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:www to:192.168.0.44:80
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6112 to:192.168.0.44:6112
0 0 DNAT udp -- any any anywhere fixe udp dpt:6112 to:192.168.0.44:6112
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6113 to:192.168.0.44:6113
0 0 DNAT udp -- any any anywhere fixe udp dpt:6113 to:192.168.0.44:6113
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6114 to:192.168.0.44:6114
0 0 DNAT udp -- any any anywhere fixe udp dpt:6114 to:192.168.0.44:6114
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6115 to:192.168.0.44:6115
0 0 DNAT udp -- any any anywhere fixe udp dpt:6115 to:192.168.0.44:6115
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6116 to:192.168.0.44:6116
0 0 DNAT udp -- any any anywhere fixe udp dpt:6116 to:192.168.0.44:6116
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6117 to:192.168.0.44:6117
0 0 DNAT udp -- any any anywhere fixe udp dpt:6117 to:192.168.0.44:6117
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6118 to:192.168.0.44:6118
0 0 DNAT udp -- any any anywhere fixe udp dpt:6118 to:192.168.0.44:6118
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:6119 to:192.168.0.44:6119
0 0 DNAT udp -- any any anywhere fixe udp dpt:6119 to:192.168.0.44:6119
0 0 DNAT tcp -- any any anywhere fixe tcp dpt:4000 to:192.168.0.44:4000
0 0 DNAT udp -- any any anywhere fixe udp dpt:4000 to:192.168.0.44:4000
0 0 DNAT icmp -- any any anywhere fixe to:192.168.0.44

Chain POSTROUTING (policy ACCEPT 1248 packets, 94090 bytes)
pkts bytes target prot opt in out source destination
418 34758 MASQUERADE all -- any eth1 anywhere anywhere

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


Est-ce que vous voyez une erreur quelquepart?

D'après mes investigations, warcraft 3 n'utilise par défaut, que le port 6112 en TCP, mais dans la détresse,
j'ai ajouté tous les ports qu'il autorise (6113-6119) ainsi que le 4000 (quelqu'un en parlait sur un forum).

HELP !!!

Merci !
  • # 2, 3 trucs...

    Posté par  . Évalué à 1.

    1) Teste les ports ouverts par War3
    - machine XP => cmd => netstat -na (avant et pendant l'éxécution de war3)

    - machine (linux) sur le même LAN => nmap -sS IP_machine_winXP (pour le tcp)+ nmap -sU IP_machine_winXP (pour l'udp)

    2) Teste des nmap sur tous les ports que t'as trouvé d'un LAN à l'autre

    3) Bon courage ou recherche encore sur google

    4) Pourquoi ne pas faire du routage simple (cad pour quoi faire du MASQUERADING/NAT entre 2 LAN) ?
  • # Réponse

    Posté par  . Évalué à 1.

    Sur la machine XP, quand war3 est lancé, le port 6112 est en listening.

    Pour le coup du masquerading, ça me paraissait pas trop mal, mais c'est vrai que le routage simple pourait peut-etre marcher aussi.
    • [^] # Re: Réponse

      Posté par  . Évalué à 1.

      Si c'est 2 LAN est que tu n'a pas de besoin particulier, tu n'as aucune raison de faire du NAT.

      En entreprise, plusieurs LAN sont reliés par des routeurs qui dans la plupart des cas ne font pas de NAT.

      En espérant que ça t'aide :)

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.