INSTRUCTIONS:
i) Installez les pets hostapd et bridge-utils.
ii) Installez aussi un des pets madwifi si vous avez un Atheros AR512x wifi device (PCI or PCMCIA), et rebootez.
Définissez :
- Comment allez-vous appeler votre point d’accès - ce sera le SSID.
- si vous voulez un cryptage WPA or WPA2 , ou pas de cryptage.
- Si Cryptage, quelle passphrase. Il vous faudra convertir l’ASCII passphrase choisie dans sa valeur hexadécimale 64 digit avec la commande -
Code:
wpa_passphrase <ssid> <passphrase>
Tous ces paramètres doivent être enregistrés dans /etc/hostapd.conf
J’ai pre-configuré un SSID "Puppy_Hotspot", avec WPA2 encryption, avec la PSK passphrase "woof1234".
Vous n’aurez rien à changer si vous utilisez ma configuration
Regardez toutefois /etc/hostapd.conf dans Geany juste pour voir de quoi je parle. J’ai commenté le PSK password (woof1234) et utilisé la valeur hexadécimale de la passphrase, calculée comme expliqué plus haut.
Notez la valeur de WPA2 encryption: "wpa_pairwise=CCMP"
Pour utiliser la vieille valeur WPA encryption, tapez : "wpa_pairwise=TKIP"
Si vous ne voulez pas de cryptage, tapez "wpa=0"
For the hostap_pci/hostap_cs drivers, changez "interface=ath0" en "interface=wlan0", et changez "driver=madwifi" en "driver=hostap", et changez "hw_mode=g" en "hw_mode=b".
Connectez maintenant votre ethernet interface to some form of modem/router. Ce sera la internet connection que vous partagerez via votre wifi interface.
Si vous aviez configuré votre ethernet interface avec Puppy's Network Wizard, il faut éliminer la configuration :
Code:
ifconfig eth0 down
Vous devez éliminer le dhcpcd daemon - TRES IMPORTANT.
Dans le Menu > System > System Status and Config > Pprocess process manager, vous devriez trouver "dhcpcd -d -l eth0"
Selectionnez-le, et cliquez "End process"
Otez le fichier stale dhcpcd run avec cette commande -
Code:
rm -f /var/run/dhcpcd-eth0.*
Changez votremode wifi driver "Station/Managed" mode en "AP/Master" mode -
Code:
ifconfig ath0 down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
Pour les hostap_pci/hostap_cs drivers, faire
ifconfig wlan0 down
iwconfig wlan0 mode Master
Ensuite bridgez your ethernet interface sur votre wifi interface :
Code:
ifconfig eth0 0.0.0.0 up
ifconfig ath0 0.0.0.0 up
modprobe bridge
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 ath0
Pour les hostap_pci/hostap_cs drivers, changez "ath0" en "wlan0".
Votre Puppy computer est reconnu sur le LAN par sa bridged interface: br0.
En theory donner une IP address à votre Puppy computer pour sa bridged interface n’est pas obligé mais en practique c’est essentiel. Faites ceci :
Code:
rm -f /var/run/dhcpcd-br0.*
dhcpcd -t 30 -h puppypc -d br0
I found that this may take 15 seconds or so! dhcpcd seems to struggle with a "br0" interface.
Various code will run by, and eventually you should see "...forking to background".
Vous voilà prêts à lancer le hostapd daemon
Code:
hostapd /etc/hostapd.conf -dd
Les deux dernières lignes que vous verrez seront :
"ath0: Setup of interface done.
l2_packet_receive - recvfrom: Network is down"
Ne vous affolez pas, c’est réussi.
Tout wifi client pourra se connecter à votre Puppy access point.
Bonne nouvelle j’ai créé un script dans /usr/bin appelé "Wifi-AP-launch.sh"
Obviously you can run this script from an rxvt terminal, but better still, I have created a desktop launch-script called "Wifi-AP-launch". With ROX, go to /usr/bin and drag the icon for "Wifi-AP-launch" (not Wifi-AP-launch.sh") onto the desktop. This is ready to go, but it has a generic icon. To give it a nice icon, right-click it, select File 'Wifi-AP-launch' > Set Icon...
and this will present a window. Use ROX to drag /usr/local/lib/X11/pixmaps/Wifi-AP-48.png into the window.
Done!
UPDATE: just because your Puppy computer is now a wifi Access Point, don't assume it's acting as a router ... it's not. See my later post about router/server/network considerations -
http://www.murga-linux.com/puppy/viewto ... 738#551738