Cercher?, tempo permettendo, di raccogliere le configurazioni TESTATE e funzionanti su Fonera di OpenWrt Kamikaze 7.09.
PremessaLa prima connessione al router con OpenWrt DEVE essere fatta usando la porta 23 Telnet e solo dopo aver cambiato la password di ?root? con il comando ?passwd? la porta 22 SSH.
Dal sito http://x-wrt.org potete scaricare la versione di OpenWrt Kamikze 7.09 con installata l'interfaccia web, molto pi? semplice da configurare per i meno esperti.Io prender? come esempio la Kamikaze 7.09 'liscia' scaricata dal sito OpenWrt.
Per installare i pacchetti in OpenWrt avete due modi, con o senza collegamento internet.
Ovviamente se avete installato X-Wrt userete l'interfaccia web
Ricordo ancora una volta i comandi dell'editor VI:
Uso dell'editor VI:
- Per modificare premere il tasto 'Ins'
- Per uscire dal modo edit premere 'Esc'
- Per salvare il file modificato premere 'Esc', 'Shift' +':' seguito da 'wq!'
Ricordate che '0' significa disabilitato e '1' abilitato.
Le '' non vengono considerate, sono molto utili per inserire password e dati senza spazi accidentali.
Installazione dei pacchetti con collegamento internet.1) Aprite Putty , connettetevi , ed appena effettuato l?accesso impostiamo il nostro router per la connessione ad internet;
2) Digitiamo ?vi /etc/config/network? , nella sezione ?config interface lan? inseriamo i dati della nostra connessione internet compreso il gateway e il dns, vedi esempio;
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.2
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 192.168.1.1
Salviamo il file (vedi i comandi per usare VI sopra) e riavviamo il router.
3) Se abbiamo inserito tutto correttamente ora possiamo installare tutto tramite internet.
Effettuiamo nuovamente il login e successivamente il digitiamo ?ipkg update? ed appena viene aggiornata la lista ?ipkg? seguito dal nome del pacchetto che vogliamo installare.
Installare i pacchetti senza collegamento internet.Programmi necessari:
HFS -
http://www.rejetto.com/hfs/?f=dl1) Scaricatevi i pacchetti che volete installare dal sito OpenWrt (in questo caso per la Fonera):
http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/packages/ Se volete installare hostapd e wpa-supplicant dovete scaricare:
- zlib_1.2.3-4_mips.ipk
- libopenssl_0.9.8e-1_mips.ipk
- hostapd_0.5.7-1_mips.ipk
- wpa-supplicant_0.5.7-1_mips.ipk
2) Aprite HFS e aggiungete, usando il tasto destro, i file appena scaricati.
3) Dalla console di OpenWrt digitate ? wget
http://scrivi_l?indirizzo_ip_del_tuo_pc/nome_pacchetto? e poi ?ipkg install nome_pacchetto? esempio:
wget http://192.168.1.2/zlib_1.2.3-4_mips.ipk
ipkg install zlib_1.2.3-4_mips.ipk
Ora iniziamo con le configurazioni
1) Access Point in WDS e Client bridge in WDS - Sicurezza WPA 2 AESPacchetti installati:
BusyBox v1.4.2 (2007-09-29 07:21:40 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (7.09) -----------------------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@OpenWrt:~# ipkg list_installed
base-files-atheros-2.6 - 10-9078 -
bridge - 1.0.6-1 -
busybox - 1.4.2-2 -
dnsmasq - 2.39-1 -
dropbear - 0.50-2 -
hostapd - 0.5.7-1 -
hotplug2 - 0.9+r102-2 -
iptables - 1.3.7-1 -
kernel - 2.6.21.5-atheros-1 -
kmod-madwifi - 2.6.21.5+r2568-20070710-atheros-2 -
kmod-ppp - 2.6.21.5-atheros-1 -
kmod-pppoe - 2.6.21.5-atheros-1 -
libgcc - 4.1.2-10 -
libopenssl - 0.9.8e-1 -
mtd - 5 -
ppp - 2.4.3-8 -
ppp-mod-pppoe - 2.4.3-8 -
uclibc - 0.9.28-10 -
udevtrigger - 106-1 -
wireless-tools - 29-1 -
wpa-supplicant - 0.5.7-1 -
zlib - 1.2.3-4 -
Done.
root@OpenWrt:~#
Configurazione Access Point in WDS:root@OpenWrt:~# vi /etc/config/dhcp
config dhcp
option interface lan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
option start 100
option limit 150
option leasetime 12h
config dhcp
option interface wan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
root@OpenWrt:~# vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.2 # Questo ? il nuovo indirizzo ip dell'AP
option netmask 255.255.255.0
root@OpenWrt:~# vi /etc/config/wireless
config wifi-device wifi0
option type atheros
option channel 5
option diversity 0
option txantenna 1
option rxantenna 1
option distance 2000
option disabled 0
config wifi-iface
option device wifi0
option network lan
option txpower 18
option bgscan 0
option mode ap
option wds 1
option hidden 1
option isolate 0
option ssid OpenWrt
option encryption psk2
option key 'Scrivi qui la tua password'
Configurazione Client Bridge in WDS:root@OpenWrt:~# vi /etc/config/dhcp
config dhcp
option interface lan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
option start 100
option limit 150
option leasetime 12h
config dhcp
option interface wan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
root@OpenWrt:~# vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.3
option netmask 255.255.255.0
root@OpenWrt:~# vi /etc/config/wireless
config wifi-device wifi0
option type atheros
option channel 5
option diversity 0
option txantenna 1
option rxantenna 1
option distance 2000
option disabled 0
config wifi-iface
option device wifi0
option network lan
option txpower 18
option bgscan 0
option mode sta
option wds 1
option hidden 1
option isolate 0
option ssid OpenWrt
option bssid xx:xx:xx:xx:xx:xx # Inserisci qui il MAC della Fonera in AP mode
option encryption psk2
option key 'Scrivi qui la tua password'
2) Access Point in WDS e Access Point in WDS - Sicurezza WPA 2 AESPacchetti installati:
BusyBox v1.4.2 (2007-09-29 07:21:40 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (7.09) -----------------------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@OpenWrt:~# ipkg list_installed
base-files-atheros-2.6 - 10-9078 -
bridge - 1.0.6-1 -
busybox - 1.4.2-2 -
dnsmasq - 2.39-1 -
dropbear - 0.50-2 -
hostapd - 0.5.7-1 -
hotplug2 - 0.9+r102-2 -
iptables - 1.3.7-1 -
kernel - 2.6.21.5-atheros-1 -
kmod-madwifi - 2.6.21.5+r2568-20070710-atheros-2 -
kmod-ppp - 2.6.21.5-atheros-1 -
kmod-pppoe - 2.6.21.5-atheros-1 -
libgcc - 4.1.2-10 -
libopenssl - 0.9.8e-1 -
mtd - 5 -
ppp - 2.4.3-8 -
ppp-mod-pppoe - 2.4.3-8 -
uclibc - 0.9.28-10 -
udevtrigger - 106-1 -
wireless-tools - 29-1 -
wpa-supplicant - 0.5.7-1 -
zlib - 1.2.3-4 -
Done.
root@OpenWrt:~#
Configurazione Access Point nr. 1 in WDS:root@OpenWrt:~# vi /etc/config/dhcp
config dhcp
option interface lan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
option start 100
option limit 150
option leasetime 12h
config dhcp
option interface wan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
root@OpenWrt:~# vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.2 # Questo ? il nuovo indirizzo ip dell'AP
option netmask 255.255.255.0
root@OpenWrt:~# vi /etc/config/wireless
config wifi-device wifi0
option type atheros
option channel 5
option diversity 0
option txantenna 1
option rxantenna 1
option distance 2000
option disabled 0
config wifi-iface
option device wifi0
option network lan
option txpower 18
option bgscan 0
option mode ap
option wds 1
option bssid xx:xx:xx:xx:xx:xx # Inserisci il MAC dell'AP nr. 2
option hidden 1
option isolate 0
option ssid Nabuk
option encryption psk2
option key 'Scrivi qui la tua password'
Configurazione Access Point nr. 2 in WDS:root@OpenWrt:~# vi /etc/config/dhcp
config dhcp
option interface lan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
option start 100
option limit 150
option leasetime 12h
config dhcp
option interface wan
option ignore 1
# option ignore 1 disabililita il dhcp, metterlo a 0 per riattivarlo
root@OpenWrt:~# vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.3
option netmask 255.255.255.0
root@OpenWrt:~# vi /etc/config/wireless
config wifi-device wifi0
option type atheros
option channel 5
option diversity 0
option txantenna 1
option rxantenna 1
option distance 2000
option disabled 0
config wifi-iface
option device wifi0
option network lan
option txpower 18
option bgscan 0
option mode ap
option wds 1
option bssid xx:xx:xx:xx:xx:xx # Inserisci il MAC dell'AP nr. 1
option hidden 1
option isolate 0
option ssid Nabuk
option encryption psk2
option key 'Scrivi qui la tua password'
3) RepeaterAP Principale (IP 192.168.1.1) <---Wi-Fi---> Fonera (IP 192.168.2.1)<---Wi-Fi---> Client Wi-Fi (IP 192.168.2.x)
|
PC collegato alla LAN (192.168.2.x)
Inutile ripetere che se volete usare WPA e il client mode dovete installare wpa-supplicant, hostapd, zlib e libopenssl.
Riporto per sicurezza i pacchetti installati nella Fonera che ho impostato.
root@OpenWrt:~# ipkg list_installed
base-files-atheros-2.6 - 10-9078 -
bridge - 1.0.6-1 -
busybox - 1.4.2-2 -
dnsmasq - 2.39-1 -
dropbear - 0.50-2 -
hostapd - 0.5.7-1 -
hotplug2 - 0.9+r102-2 -
iptables - 1.3.7-1 -
kernel - 2.6.21.5-atheros-1 -
kmod-madwifi - 2.6.21.5+r2568-20070710-atheros-2 -
kmod-ppp - 2.6.21.5-atheros-1 -
kmod-pppoe - 2.6.21.5-atheros-1 -
libgcc - 4.1.2-10 -
libopenssl - 0.9.8e-1 -
mtd - 5 -
ppp - 2.4.3-8 -
ppp-mod-pppoe - 2.4.3-8 -
uclibc - 0.9.28-10 -
udevtrigger - 106-1 -
wireless-tools - 29-1 -
wpa-supplicant - 0.5.7-1 -
zlib - 1.2.3-4 -
Done.
Sezione Network
vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.2.1 # Questo sar? il nuovo indirizzo IP della Fonera
option netmask 255.255.255.0
option gateway 192.168.2.1
option dns 208.67.222.222
config interface wan
option proto static
option ipaddr 192.168.1.200 # Scrivi un indirizzo IP, non in uso, LAN del tuo AP
option netmask 255.255.255.0
option gateway 192.168.1.1 # Metti l'indirizzo IP del tuo AP
option dns 208.67.222.222
Impostiamo ora la sezione Wireless
vi /etc/config/wireless
config wifi-device wifi0
option type atheros
option channel 2
option disabled 0
config wifi-iface
option device wifi0
option network lan
option mode ap
option ssid OpenWrt2 # Scrivi il nome della nuova rete wi-fi
option hidden 0 # Vuoi nascondere l'ssid ?
option encryption psk2 # Imposta la cifratura, psk2=WPA2 AES, psk=WPA TKIP
option key 'Nabuk'
config wifi-iface
option device wifi0
option network wan
option mode sta
option ssid OpenWrt # Metti il nome della rete che vuoi ripetere
option encryption psk2 # Imposta la cifratura in uso nell'AP, psk2=WPA2 AES, psk=WPA TKIP
option key 'Nabuk'