[ad-hoc] réseau crée mais pas de connexion internet

Applications, problèmes de configuration réseau
malmsteen
Hankyu
Messages : 39
Inscription : mer. 04 mai 2011, 14:01

[ad-hoc] réseau crée mais pas de connexion internet

Message par malmsteen »

salut a tous
j ai suivi ce tuto pour créer une connexion ad-hoc depuis mon pc de bureau en utilisant une cle usb wifi tplink
wiki a écrit :Using NetworkManager

Install and set-up NetworkManager on both the server and the client.
On the Server

Plug the wireless adapter into the computer which you wish to use as the server. Click on the nm-applet in the dock and choose "Create New Wireless Network".

With the dialog box, type in your SSID and choose your security type and password, then click "Create".

Afterwards, right-click on the nm-applet in the dock and choose "Edit Connections". Click on the "Wireless" tab and select the SSID for the network you just created. Click on "Edit".

With the dialog box which pops up, make sure "Mode" is set to "Ad-hoc".

In "IP4 Settings", change "Method" to "Manual" and click on "Add" next to the "Addresses" box. It then should highlight the box to the left where you have to enter three IP addresses.

For "Address" choose a value between 192.168.0.0 to 192.168.255.255; "Netmask", 255.255.255.0; "Gateway", 1.1.1.1. then click save.

Finally, click on the nm-applet in the tray again and select "Connect to Hidden Wireless Network"; then in the "Connection" drop-down box select the network which you just created. It should then connect.
On the Client

On the nm-applet in the tray, click on the wireless network you created and connect to it; afterwards, right-click and choose "Edit Connections". Again, click on the "Wireless" tab and select the SSID for your network and choose "Edit".

In the "IP4 Settings" again change the "Method" to "Manual" and click on "Add" next to the "Addresses" box.

For the "Address" choose a value between 192.168.0.0 to 192.168.255.255 but make sure it is different to the one you selected for the server; afterwards fill in "Netmask", 255.255.255.0; "Gateway", 1.1.1.1. then click save.

It should then allow you to connect to the server (try pinging the server to ensure this).
j ai réussi a établir un réseau ,qui est bien capté par mon pc portable et j ai bien la notification que mon reseau est connecté, mais quand je sort un navigateur en tappant gogle par exemple j ai la fenêtre

Code : Tout sélectionner

(The connection has timed out  
 
  The site could be temporarily unavailable or too busy. Try again in a few
    moments.
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web)
PS: je n ai pas essayer le ping, désolé mais je ne sais pas comment le faire
merci
Edite: mon pc de bureau est avec archbang et le pc portable est avec ubuntu (avec lmde le partage se fait directement en mettant ipv4 sur "partager avec d autres ordinateur")
Avatar de l’utilisateur
widapit
Maître du Kyudo
Messages : 1148
Inscription : mar. 30 mars 2010, 22:53
Localisation : Toulouse

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par widapit »

Salut !

à première vue, rapidement je dirais que ça serait bien d'avoir les retours de ifconfig ou ip et iwconfig sur les deux machines :
ainsi qu'un

Code : Tout sélectionner

route -n
coté client et vérifier que le forwarding (iptables et /etc/syctl.conf si je me rappele bien) soit autorisé coté serveur .
pour le ping, tu ouvres un terminal et tu fais simplement : (man ping pour le détail des options !)

Code : Tout sélectionner

ping -c3 google.fr
ping -c3 <ip.de.ta.box>
routeur(OpenWRT); serveurs(Debian, Arch); cléUSB(Black-Arch);
mon ordi(Arch-hardened) = {spectrwm, zsh} || je m'amuse aussi avec des Arduino !
malmsteen
Hankyu
Messages : 39
Inscription : mer. 04 mai 2011, 14:01

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par malmsteen »

salut
pour ifconfig j' ai command not found
pour

Code : Tout sélectionner

$ ifconfig
bash: ifconfig: command not found
[kqkou@archbang ~]$ iwconfig
o        no wireless extensions.

eth1      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"wifi"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: A2:8A:B1:5B:07:09   
          Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
eth0      no wireless extensions.

Code : Tout sélectionner

route -n
bash: route: command not found

Code : Tout sélectionner

 ping -c3 google.fr
PING google.fr (173.194.35.183) 56(84) bytes of data.
64 bytes from muc03s02-in-f23.1e100.net (173.194.35.183): icmp_req=1 ttl=51 time=111 ms
64 bytes from muc03s02-in-f23.1e100.net (173.194.35.183): icmp_req=2 ttl=51 time=116 ms
64 bytes from muc03s02-in-f23.1e100.net (173.194.35.183): icmp_req=3 ttl=51 time=117 ms

--- google.fr ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 111.687/114.991/117.253/2.404 ms

Code : Tout sélectionner

ping -c3 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_req=1 ttl=64 time=0.061 ms
64 bytes from 192.168.1.3: icmp_req=2 ttl=64 time=0.037 ms
64 bytes from 192.168.1.3: icmp_req=3 ttl=64 time=0.039 ms

--- 192.168.1.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.037/0.045/0.061/0.013 ms
ca c'est du coté serveur
Avatar de l’utilisateur
widapit
Maître du Kyudo
Messages : 1148
Inscription : mar. 30 mars 2010, 22:53
Localisation : Toulouse

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par widapit »

si je dis pas de bêtise, ifconfig et route viennent avec le paquet net-tools; qu'il faut donc installer !
sinon, tu as l'équivalent de ces commandes avec ip :

Code : Tout sélectionner

ip link show
ip addr show
ip route show
ensuite, je pense que maintenant, il serait interessant de voir ce que donne les ping mais depuis le client ! puisqu'apparement le serveur se connecte au net lui, pas de soucis... :wink:
routeur(OpenWRT); serveurs(Debian, Arch); cléUSB(Black-Arch);
mon ordi(Arch-hardened) = {spectrwm, zsh} || je m'amuse aussi avec des Arduino !
malmsteen
Hankyu
Messages : 39
Inscription : mer. 04 mai 2011, 14:01

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par malmsteen »

salut
désolé pour le retard mais j avais des empéchements
voila une serie de téste sur le serveur et le client
pour le serveur

Code : Tout sélectionner

kakou@pc ~ $ ifconfig
Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative priviledges associated with your user account.
ifconfig: command not found
kakou@pc ~ $ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:8a:9b:75  
          UP BROADCAST 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:1
          collisions:0 lg file transmission:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Mémoire:cffc0000-d0000000 

eth2      Link encap:Ethernet  HWaddr 00:08:c7:f9:88:24  
          inet adr:192.168.1.5  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::208:c7ff:fef9:8824/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4910 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3775 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:5532518 (5.2 MiB)  TX bytes:393103 (383.8 KiB)

lo        Link encap:Boucle locale  
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:6288 (6.1 KiB)  TX bytes:6288 (6.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 94:0c:6d:8f:ab:d4  
          inet adr:192.168.1.25  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::960c:6dff:fe8f:abd4/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:141 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:29613 (28.9 KiB)  TX bytes:10038 (9.8 KiB)

kakou@pc ~ $ iwconfig
Command 'iwconfig' is available in '/sbin/iwconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative priviledges associated with your user account.
iwconfig: command not found
kakou@pc ~ $ /sbin/iwconfig
lo        no wireless extensions.

eth2      no wireless extensions.

pan0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"solus"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: C6:78:24:09:A6:5A   
          Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
eth0      no wireless extensions.

kakou@pc ~ $ route -n
Command 'route' is available in '/sbin/route'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative priviledges associated with your user account.
route: command not found
kakou@pc ~ $ ^C
kakou@pc ~ $ /sbin/route
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth2
192.168.1.0     *               255.255.255.0   U     1      0        0 eth2
192.168.1.0     *               255.255.255.0   U     2      0        0 wlan0
kakou@pc ~ $ ping -c3 google.fr
PING google.fr (173.194.35.184) 56(84) bytes of data.
64 bytes from muc03s02-in-f24.1e100.net (173.194.35.184): icmp_req=1 ttl=51 time=79.6 ms
64 bytes from muc03s02-in-f24.1e100.net (173.194.35.184): icmp_req=2 ttl=51 time=73.9 ms
64 bytes from muc03s02-in-f24.1e100.net (173.194.35.184): icmp_req=3 ttl=51 time=76.9 ms

--- google.fr ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 73.973/76.871/79.683/2.353 ms
kakou@pc ~ $ ping -c3 192.168.1.25
PING 192.168.1.25 (192.168.1.25) 56(84) bytes of data.
64 bytes from 192.168.1.25: icmp_req=1 ttl=64 time=0.066 ms
64 bytes from 192.168.1.25: icmp_req=2 ttl=64 time=0.048 ms
64 bytes from 192.168.1.25: icmp_req=3 ttl=64 time=0.051 ms

--- 192.168.1.25 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.048/0.055/0.066/0.007 ms
kakou@pc ~ $ 
*pour le client

Code : Tout sélectionner

kakou@MX67:~$  ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1a:92:5d:d7:3e  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
          Interruption:16 Adresse de base:0xd800 

lo        Link encap:Boucle locale  
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          Packets reçus:6926 erreurs:0 :0 overruns:0 frame:0
          TX packets:6926 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          Octets reçus:459684 (459.6 KB) Octets transmis:459684 (459.6 KB)

wlan0     Link encap:Ethernet  HWaddr 00:19:d2:35:97:ad  
          inet adr:192.168.1.3  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::219:d2ff:fe35:97ad/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:220 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:0 (0.0 B) Octets transmis:49340 (49.3 KB)

kakou@MX67:~$ iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:"solus"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: C6:78:24:09:A6:5A   
          Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
eth0      no wireless extensions.

kakou@MX67:~$ route -n
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
0.0.0.0         1.1.1.1         0.0.0.0         UG    0      0        0 wlan0
1.1.1.1         0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0
kakou@MX67:~$ ping -c3 google.fr
ping: unknown host google.fr
kakou@MX67:~$ ping -c3 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_req=1 ttl=64 time=0.051 ms
64 bytes from 192.168.1.3: icmp_req=2 ttl=64 time=0.043 ms
64 bytes from 192.168.1.3: icmp_req=3 ttl=64 time=0.043 ms

--- 192.168.1.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.043/0.045/0.051/0.008 ms
kakou@MX67:~$ ping -c3 www.google.fr

Avatar de l’utilisateur
widapit
Maître du Kyudo
Messages : 1148
Inscription : mar. 30 mars 2010, 22:53
Localisation : Toulouse

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par widapit »

Bon, alors une dernière chose : Avec ton client
puisque le ping marche sur ton réseau, tu fais un ping sur une addresse de google, style

Code : Tout sélectionner

ping -c3 173.194.34.24
et là, soit tu as le même message, dans ce cas tu ne sors pas de ton réseau et on cherchera par là,
soit ça marche et il ne te restera qu'a configurer un DNS . :mrgreen:
routeur(OpenWRT); serveurs(Debian, Arch); cléUSB(Black-Arch);
mon ordi(Arch-hardened) = {spectrwm, zsh} || je m'amuse aussi avec des Arduino !
malmsteen
Hankyu
Messages : 39
Inscription : mer. 04 mai 2011, 14:01

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par malmsteen »

salut voila

Code : Tout sélectionner

kakou@MX67:~$ ping -c3 173.194.34.24
PING 173.194.34.24 (173.194.34.24) 56(84) bytes of data.
From 192.168.1.5 icmp_seq=1 Destination Host Unreachable
From 192.168.1.5 icmp_seq=2 Destination Host Unreachable
From 192.168.1.5 icmp_seq=3 Destination Host Unreachable

--- 173.194.34.24 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2015ms
pipe 3
kakou@MX67:~$ 
Avatar de l’utilisateur
widapit
Maître du Kyudo
Messages : 1148
Inscription : mar. 30 mars 2010, 22:53
Localisation : Toulouse

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par widapit »

euh j'avais pas relevé mais ça me semble bizarre cette gateway en 1.1.1.1 dans le route -n de ton client :? :zarb:
routeur(OpenWRT); serveurs(Debian, Arch); cléUSB(Black-Arch);
mon ordi(Arch-hardened) = {spectrwm, zsh} || je m'amuse aussi avec des Arduino !
malmsteen
Hankyu
Messages : 39
Inscription : mer. 04 mai 2011, 14:01

Re: [ad-hoc] réseau crée mais pas de connexion internet

Message par malmsteen »

voila une capture d image de l ipv4 serveur
Image
et voila pour le client (ubuntu 12.04)
Image
Répondre