Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
maison2:configuration_open_wrt:installed [04/2012] – [vsftpd] fred | maison2:configuration_open_wrt:installed [07/2013] (Version actuelle) – [Mettre à jour dynhost (ovh) en php] fred | ||
---|---|---|---|
Ligne 46: | Ligne 46: | ||
====== interface web embarqué ====== | ====== interface web embarqué ====== | ||
en utilisant web if comment la page command ([[maison2: | en utilisant web if comment la page command ([[maison2: | ||
- | |||
- | doit' | ||
====== vsftpd ====== | ====== vsftpd ====== | ||
Ligne 76: | Ligne 74: | ||
- | ====== configuer le bouton pour le wifi ====== | ||
- | < | ||
- | BUTTON | ||
- | RESTORE | ||
- | EZSETUP | ||
- | |||
- | mkdir -p / | ||
- | wget -O / | ||
- | |||
- | wget -O / | ||
- | |||
- | * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses | ||
- | * en kamikaze8.09 : voir la nouvelle procédure ... | ||
- | [[maison2: | ||
- | |||
- | uci commit wifitoggle | ||
- | |||
- | dans / | ||
- | modifier | ||
- | local section=" | ||
- | par si kamikaze 8.09 | ||
- | local section=" | ||
- | |||
- | |||
- | |||
- | rajouter dans case " | ||
- | 0|"" | ||
- | uci_set " | ||
- | uci_commit " | ||
- | echo 0 >> / | ||
- | wifi | ||
- | ;; | ||
- | 1) | ||
- | uci_set " | ||
- | uci_commit " | ||
- | echo 1 >> / | ||
- | wifi | ||
- | ;; | ||
- | |||
- | </ | ||
====== NTP ====== | ====== NTP ====== | ||
Ligne 196: | Ligne 154: | ||
root@OpenWrt:/ | root@OpenWrt:/ | ||
0 1 | 0 1 | ||
+ | </ | ||
+ | |||
+ | ====== OWFS ====== | ||
+ | [[maison2: | ||
+ | ====== se faire un initapp ====== | ||
+ | --> utiliser le fichier de demrrage de webbif : system-> | ||
+ | ====== dyndns ====== | ||
+ | installer updatedd et updatedd-mod-ovh | ||
+ | |||
+ | petit script activer au demarrage : | ||
+ | <code bash dyndns_update> | ||
+ | #!/bin/sh | ||
+ | registered=" | ||
+ | |||
+ | max_days=10 # max number of days to go without forcing an update | ||
+ | last_update=`date +%s` | ||
+ | |||
+ | max_seconds=`expr $max_days*24*60*60` | ||
+ | |||
+ | while :; do | ||
+ | current=$(wget -O - http:// | ||
+ | |||
+ | if [ $(($last_update+$max_seconds)) -lt `date +%s` ] | ||
+ | then | ||
+ | # set old_ip to be different, forcing an update | ||
+ | registered=" | ||
+ | fi | ||
+ | if [ " | ||
+ | then | ||
+ | updatedd ovh -- --ipv4 $current user:psw public_URL | ||
+ | registered=$current | ||
+ | last_update=`date +%s` | ||
+ | fi | ||
+ | sleep 300 | ||
+ | done | ||
+ | </ | ||
+ | ce script plante de temps en temps en restant planté sur le wget | ||
+ | |||
+ | __lien de support :__ | ||
+ | * http:// | ||
+ | * http:// | ||
+ | ===== Mettre à jour dynhost (ovh) en php ===== | ||
+ | <code php> | ||
+ | |||
+ | $credentials = " | ||
+ | $url = " | ||
+ | $headers = array( " | ||
+ | $ch = curl_init(); | ||
+ | curl_setopt($ch, | ||
+ | curl_setopt($ch, | ||
+ | curl_setopt($ch, | ||
+ | curl_setopt($ch, | ||
+ | |||
+ | $data = curl_exec($ch); | ||
+ | if (curl_errno($ch)) print " | ||
+ | |||
+ | echo $data; | ||
+ | |||
+ | //variante dans un genre de shell | ||
+ | # | ||
+ | :set DynDNSUrl (" | ||
+ | / | ||
+ | /tool fetch url=$DynDNSUrl dst-path="/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ====== configuer le bouton pour le wifi sur le WL500GP (non utilisé) ====== | ||
+ | < | ||
+ | BUTTON | ||
+ | RESTORE | ||
+ | EZSETUP | ||
+ | |||
+ | mkdir -p / | ||
+ | wget -O / | ||
+ | |||
+ | wget -O / | ||
+ | |||
+ | * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses | ||
+ | * en kamikaze8.09 : voir la nouvelle procédure ... | ||
+ | [[maison2: | ||
+ | |||
+ | uci commit wifitoggle | ||
+ | |||
+ | dans / | ||
+ | modifier | ||
+ | local section=" | ||
+ | par si kamikaze 8.09 | ||
+ | local section=" | ||
+ | |||
+ | |||
+ | |||
+ | rajouter dans case " | ||
+ | 0|"" | ||
+ | uci_set " | ||
+ | uci_commit " | ||
+ | echo 0 >> / | ||
+ | wifi | ||
+ | ;; | ||
+ | 1) | ||
+ | uci_set " | ||
+ | uci_commit " | ||
+ | echo 1 >> / | ||
+ | wifi | ||
+ | ;; | ||
+ | |||
</ | </ | ||
Ligne 241: | Ligne 306: | ||
<color Black/ | <color Black/ | ||
- | ====== changer le login root pour plus de secu ====== | + | ====== changer le login root pour plus de secu (non utilisé) |
en fait il n'est pas possible d' | en fait il n'est pas possible d' | ||
Ligne 248: | Ligne 313: | ||
- | ====== OPEN SSH ====== | + | ====== OPEN SSH (non utilisé) |
a supprimé , prends trop de mémoire , | a supprimé , prends trop de mémoire , | ||
| **repository** | | **repository** | ||
Ligne 273: | Ligne 338: | ||
</ | </ | ||
- | ====== | + | ====== |
- | --> | + | j'ai formaté le disque USB en FAT32 pour qu'il soit reconnu sous Windows et linux. Pour faire ceci sur un disque de 500Go il faut passer par l' |
+ | < | ||
+ | G: | ||
+ | Warning ALL data on drive ' | ||
+ | Size : 500GB 976768002 sectors | ||
+ | 512 Bytes Per Sector, Cluster size 32768 bytes | ||
+ | Volume ID is 1edf:1b4b | ||
+ | 32 Reserved Sectors, 119206 Sectors per FAT, 2 fats | ||
+ | 15258274 Total clusters | ||
+ | 15258273 Free Clusters | ||
+ | Formatting drive d:... | ||
+ | Clearing out 238508 sectors for Reserved sectors, fats and root cluster... | ||
+ | Wrote 122116096 bytes in 4.99503 seconds, 24447496.327525 bytes/sec | ||
+ | Initialising reserved sectors and FATs... | ||
+ | Done | ||
+ | </ | ||
+ | l' | ||
+ | < | ||
+ | ipkg install kmod-usb2 | ||
+ | insmod usbcore | ||
+ | insmod ehci-hcd | ||
+ | ipkg install kmod-usb-storage | ||
+ | ipkg install kmod-fs-vfat | ||
+ | ipkg install fdisk | ||
+ | |||
+ | df -h | ||
+ | Filesystem | ||
+ | none | ||
+ | / | ||
+ | mini_fo:/ | ||
+ | </code> | ||
+ | connexion du disque | ||
+ | < | ||
+ | root@OpenWrt:/# | ||
+ | scsi0 : SCSI emulation for USB Mass Storage devices | ||
+ | Vendor: WD Model: 5000AAV External | ||
+ | Type: | ||
+ | Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 | ||
+ | SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB) | ||
+ | Partition check: | ||
+ | / | ||
+ | |||
+ | fdisk -l | ||
+ | Device Boot Start | ||
+ | / | ||
+ | |||
+ | a mettre dans dans / | ||
+ | mount / | ||
+ | mount / | ||
+ | |||
+ | </ | ||
+ | [[http:// | ||
+ | |||
+ | |||
+ | | ||
+ | <code> | ||
+ | ipkg install samba-server | ||
+ | |||
+ | / | ||
+ | 27.0.0.1 localhost. | ||
+ | 192.168.0.1 openwrt | ||
+ | |||
+ | to start : / | ||
+ | |||
+ | / | ||
+ | [global] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | guest account = nobody | ||
+ | local master = yes | ||
+ | name resolve order = lmhosts hosts bcast | ||
+ | |||
+ | [HDD500] | ||
+ | | ||
+ | path = / | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | [tmp] | ||
+ | | ||
+ | path = /tmp | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ |