URL: https://linuxfr.org/forums/general-general/posts/vpn-ssh-et-pppd-probl%C3%A8me-dadresses-ip Title: VPN, SSH et PPPD, problème d'adresses ip. Authors: blenderman Date: 2004年10月14日T14:47:09+02:00 Tags: Score: 0 Bonjour, J'ai créé mon premier VPN aujourd'hui en suivant le tutoriel ici: [http://www.tldp.org/HOWTO/ppp-ssh/(...)](http://www.tldp.org/HOWTO/ppp-ssh/) Ca fonctionne, y a rien a dire le tutorial est très bien fait. Il y a un seul petit 'hic'. Si je comprend bien, le but du vpn est de 'rattacher' un ordinateur d'un réseau distant (ayant des adresses ip differente) à mon réseau local (ayant des adresses ip differentes du réseau du client). Mon réseau local est 10.0.0.0/24 et le réseau distant: 192.168.0.0/24 Je décide que l'ordinateur qui se connecte chez moi sera 10.0.0.70 et son ip locale (sur son propre réseau) sera 192.168.0.2. Je lance donc le script fourni dans le tutorial avec cette configuration: [code] [pol@localhost pol]$ ./vpn-start config SERVER_HOSTNAME=moi.homeip.net SERVER_USERNAME=vpn SERVER_IFIPADDR=10.0.0.70 CLIENT_IFIPADDR=192.168.0.2 [/code] L'ordinateur se connecte chez moi et créée une connection ppp0, la voici: [code] wolverine pol # ifconfig eth0 Lien encap:Ethernet HWaddr 00:E0:4C:FF:32:35 inet adr:10.0.0.1 Bcast:192.168.0.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interruption:18 Adresse de base:0x3000 lo Lien encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) ppp0 Lien encap:Protocole Point-à-Point inet adr:10.0.0.70 P-t-P:192.168.0.2 Masque:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:3 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) wolverine pol # [/code] Je voudrais maintenant pinger cette machine distante. Je fais donc: [code] ping 10.0.0.70 [/code] Ca fonctionne, mais je trouve que c'est très rapide. J'execute donc un nmap sur cette ip: [code] wolverine pol # nmap 10.0.0.70 Starting nmap 3.70 ( [http://www.insecure.org/nmap/(...)](http://www.insecure.org/nmap/) ) at 2004年10月14日 14:41 CEST Interesting ports on 10.0.0.70: (The 1649 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 111/tcp open rpcbind 139/tcp open netbios-ssn 443/tcp open https 445/tcp open microsoft-ds 631/tcp open ipp 892/tcp open unknown 4000/tcp open remoteanything Nmap run completed -- 1 IP address (1 host up) scanned in 0.389 seconds [/code] Puis sur ma machine: [code] wolverine pol # nmap 10.0.0.1 Starting nmap 3.70 ( [http://www.insecure.org/nmap/(...)](http://www.insecure.org/nmap/) ) at 2004年10月14日 14:41 CEST Interesting ports on wolverine.local (10.0.0.1): (The 1649 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 111/tcp open rpcbind 139/tcp open netbios-ssn 443/tcp open https 445/tcp open microsoft-ds 631/tcp open ipp 892/tcp open unknown 4000/tcp open remoteanything Nmap run completed -- 1 IP address (1 host up) scanned in 0.266 seconds [/code] Meme chose ! Bizarre non ? J'ai l'impression qu'il ne passe pas par le tunnel pour aller faire le nmap. Si j'execute [code]nmap 192.168.0.2[/code] Ca fonctionne... bizarre non ? Voila les route de mon pc: [code] wolverine pol # route -n Table de routage IP du noyau Destination Passerelle Genmask Indic Metric Ref Use Iface 192.168.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 10.0.0.70 255.255.255.0 UG 0 0 0 ppp0 127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo 0.0.0.0 10.0.0.138 0.0.0.0 UG 0 0 0 eth0 [/code] Si qqun peut m'aider a trouver comment faire pour que quand je ping 10.0.0.70, il ping l'ordinateur distant et non pas mon pc ce serait bien cool. @+

AltStyle によって変換されたページ (->オリジナル) /