Outils pour utilisateurs

Outils du site


maison2:configuration_open_wrt:installed

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
maison2:configuration_open_wrt:installed [06/2011] – modification externe 127.0.0.1maison2:configuration_open_wrt:installed [07/2013] (Version actuelle) – [Mettre à jour dynhost (ovh) en php] fred
Ligne 43: Ligne 43:
 config_set 'wl0' 'channel' '2' config_set 'wl0' 'channel' '2'
 </code> </code>
 +
 +====== interface web embarqué ======
 +en utilisant web if comment la page command ([[maison2:configuration_open_wrt:remote_shell]])
  
 ====== vsftpd ====== ====== vsftpd ======
Ligne 71: Ligne 74:
  
  
-====== configuer le bouton pour le wifi ====== 
-<code> 
-BUTTON    Event  
-RESTORE   reset   
-EZSETUP   ses  
- 
-mkdir -p /etc/hotplug.d/button 
-wget -O /etc/hotplug.d/button/01-wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.hotplug1" 
- 
-wget -O /etc/config/wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.config1" 
- 
-  * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses 
-  * en kamikaze8.09 : voir la nouvelle procédure ...  
-[[maison2:configuration_open_wrt:kamikaze_8_09_rc1]]  
- 
-uci commit wifitoggle  
- 
-dans /etc/hotplug.d/button/01-wifitoggle 
-modifier  
-local section="cfg1" 
-par si kamikaze 8.09 
-local section="cfg022c70" 
- 
- 
- 
-rajouter dans case "$WIFI_RADIOSTATUS" in 
-                0|"") 
-                        uci_set "wireless" "$section" "disabled" "1" 
-                        uci_commit "wireless" 
-                        echo 0 >> /proc/diag/led/power    <=============ligne a ajouter 
-                        wifi 
-                ;; 
-                1) 
-                        uci_set "wireless" "$section" "disabled" "0" 
-                        uci_commit "wireless" 
-                        echo 1 >> /proc/diag/led/power    <=============ligne a ajouter 
-                        wifi 
-                ;; 
- 
-</code> 
  
 ====== NTP ====== ====== NTP ======
Ligne 138: Ligne 101:
  
 Puis redémarrer le routeur. Puis redémarrer le routeur.
 +
 + Sep 28 13:51:30 abu ntpd[4100]: adjtime failed: Invalid argument
 +
 +The problem is that your clock seems to be off by about 2 hours, and
 +the kernel doesn't allow adjusting a clock which such big offset
 +because it'll just take too long.
 +
 +What you can do is:
 +- Edit the /etc/default/openntpd file and uncomment the line:
 +  #DAEMON_OPTS="-s" So that it reads DAEMON_OPTS="-s"
 +  This will set the clock correctly once at startup.
 +- Use some other means of setting your clock correct, like
 +  running ntpdate.
  
  
Ligne 178: Ligne 154:
 root@OpenWrt:/dev/usb/tts# ls root@OpenWrt:/dev/usb/tts# ls
 0  1 0  1
 +</code>
 +
 +====== OWFS ======
 +[[maison2:configuration_open_wrt:OWFS]]
 +====== se faire un initapp ======
 +--> utiliser le fichier de demrrage de webbif : system->startup
 +====== dyndns ======
 +installer updatedd et updatedd-mod-ovh
 +
 +petit script activer au demarrage : 
 +<code bash dyndns_update>
 +#!/bin/sh
 +registered="0.0.0.0"
 +
 +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://checkip.dyndns.org|sed s/[^0-9.]//g)
 +
 +        if [ $(($last_update+$max_seconds)) -lt `date +%s` ]
 +        then
 +                # set old_ip to be different, forcing an update
 +                registered="0.0.0.0"
 +        fi
 +        if [ "$current" != "$registered" ]
 +        then
 +                updatedd ovh -- --ipv4 $current user:psw public_URL
 +                registered=$current
 +                last_update=`date +%s`
 +        fi
 +        sleep 300
 +done
 +</code>
 +ce script plante de temps en temps en restant planté sur le wget
 +
 +__lien de support :__
 +  * http://kubuntu.free.fr/wiki/?page=OpenWrt_backfire  a regarder pour WOL et updatedd
 +  * http://lermit-informatique.blogspot.fr/2009/08/ovh-le-dynhost-de-ovh-et-updatedd.html
 +===== Mettre à jour dynhost (ovh) en php =====
 +<code php>
 +
 +$credentials = "identifiantdynhost:motdepasseovh";
 +$url = "http://www.ovh.com/nic/update?system=dyndns&hostname=nomdedomaine&myip=ip";
 +$headers = array( "User-Agent: ipcheck/0.67", "Authorization: Basic " . base64_encode($credentials));
 +$ch = curl_init();
 +curl_setopt($ch, CURLOPT_URL,$url);
 +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 +curl_setopt($ch, CURLOPT_TIMEOUT, 60);
 +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 +
 +$data = curl_exec($ch);
 +  if (curl_errno($ch)) print "Error: " . curl_error($ch);
 +
 +echo $data; 
 +
 +//variante dans un genre de shell
 +#     Update DynDNS with the new IP
 +    :set DynDNSUrl ("http://".$DynDNSUsername.":".$DynDNSPassword."@".$DynDNSServiceProvider."
 +/nic/update?system=dyndns&hostname=".$DynDNSHostname."&myip=".$CurrentPublicIP."&wildcard=no");
 +    /tool fetch url=$DynDNSUrl dst-path="/dyndns.txt";
 +
 +</code>
 +
 +[[http://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe/download?use_mirror=heanet|wget pour windows]] solution pour papa
 +
 +====== configuer le bouton pour le wifi sur le WL500GP (non utilisé) ======
 +<code>
 +BUTTON    Event 
 +RESTORE   reset  
 +EZSETUP   ses 
 +
 +mkdir -p /etc/hotplug.d/button
 +wget -O /etc/hotplug.d/button/01-wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.hotplug1"
 +
 +wget -O /etc/config/wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.config1"
 +
 +  * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses
 +  * en kamikaze8.09 : voir la nouvelle procédure ... 
 +[[maison2:configuration_open_wrt:kamikaze_8_09_rc1]] 
 +
 +uci commit wifitoggle 
 +
 +dans /etc/hotplug.d/button/01-wifitoggle
 +modifier 
 +local section="cfg1"
 +par si kamikaze 8.09
 +local section="cfg022c70"
 +
 +
 +
 +rajouter dans case "$WIFI_RADIOSTATUS" in
 +                0|"")
 +                        uci_set "wireless" "$section" "disabled" "1"
 +                        uci_commit "wireless"
 +                        echo 0 >> /proc/diag/led/power    <=============ligne a ajouter
 +                        wifi
 +                ;;
 +                1)
 +                        uci_set "wireless" "$section" "disabled" "0"
 +                        uci_commit "wireless"
 +                        echo 1 >> /proc/diag/led/power    <=============ligne a ajouter
 +                        wifi
 +                ;;
 +
 </code> </code>
  
Ligne 223: Ligne 306:
 <color Black/red>afin d'accéder en shell de l'exterieur on utilisera</color> [[maison2:configuration_open_wrt:remote_shell]] <color Black/red>afin d'accéder en shell de l'exterieur on utilisera</color> [[maison2:configuration_open_wrt:remote_shell]]
  
-====== 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'ajouter d'autres utilisateurs. donc pour accéder d'un site distant on utilisera un telnet like ou la procedure de login n'utilise pas la password root ... en fait il n'est pas possible d'ajouter d'autres utilisateurs. donc pour accéder d'un site distant on utilisera un telnet like ou la procedure de login n'utilise pas la password root ...
Ligne 230: Ligne 313:
  
  
-====== OPEN SSH ======+====== OPEN SSH (non utilisé) ======
 a supprimé , prends trop de mémoire , a supprimé , prends trop de mémoire ,
 |  **repository**  |  **SUBJECT**  |  **name**  |**Version**|**Depends**|**Section**|**Size**|**Description**^ |  **repository**  |  **SUBJECT**  |  **name**  |**Version**|**Depends**|**Section**|**Size**|**Description**^
Ligne 254: Ligne 337:
 # /etc/init.d/sshd start # /etc/init.d/sshd start
 </code> </code>
 +
 +====== installation du disque usb externe (non utilisé)======
 +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'utilitaire [[http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm|fat32format.exe]] parceque windows refuse de le faire.
 +<code>
 +G:\cdrom_install_div\cd_install>fat32format d:
 +Warning ALL data on drive 'd' will be lost irretrievably, are you sure (y/n) :y
 +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
 +</code>
 +l'installation proprement dite
 +<code>
 +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                Size      Used Available Use% Mounted on
 +none                     14.9M     32.0k     14.9M   0% /tmp
 +/dev/mtdblock/          6.0M      1.9M      4.1M  31% /jffs
 +mini_fo:/jffs             1.2M      1.2M         0 100% /
 +</code>
 +connexion du disque
 +<code>
 +root@OpenWrt:/# hub.c: new USB device 01:03.2-1, assigned address 2
 +scsi0 : SCSI emulation for USB Mass Storage devices
 +Vendor: WD        Model: 5000AAV External  Rev: 1.65
 +Type:   Direct-Access                      ANSI SCSI revision: 02
 +Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
 +SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
 +Partition check:
 +/dev/scsi/host0/bus0/target0/lun0: p1
 +
 +fdisk -l
 +Device Boot      Start         End      Blocks   Id  System
 +/dev/scsi/host1/bus0/target0/lun0/part1 1       60801   488384001    c  W95 FAT32 (LBA)
 +
 +a mettre dans dans /etc/init.d/done
 +mount /dev/scsi/host1/bus0/target0/lun0/part1 /mnt_usb_stick  <=== port USB le plus haut
 +mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt_usb_stick  <=== port USB le plus bas
 +
 +</code>
 +[[http://forum.openwrt.org/viewtopic.php?id=17424| ntfs-3g is working on Wl-500g Premium kernel 2.4 by MoD  ]]
 +
 +
 + ====== samba ======
 +<code>
 +ipkg install samba-server
 +
 +/etc/hosts
 +27.0.0.1 localhost.
 +192.168.0.1 openwrt   <================ à ajouter 
 +
 +to start : /etc/init.d/samba start a mettre dans /etc/init.d/done
 +
 +/etc/samba/smb.conf
 +[global]
 + syslog = 0
 + syslog only = yes
 + workgroup = GBA           <==================  modifié
 + server string = OpenWrt Samba Server
 + security = share
 + encrypt passwords = yes
 + guest account = nobody
 + local master = yes
 + name resolve order = lmhosts hosts bcast
 +
 +[HDD500]
 + comment = /mnt_usb_stick
 + path = /mnt_usb_stick
 + browseable = yes
 + public = yes
 + writeable = yes
 +
 +[tmp]
 + comment = /tmp
 + path = /tmp
 + browseable = yes
 + public = yes
 + writeable = no
 +
 +</code>
 +
 +
 +
 +
maison2/configuration_open_wrt/installed.1307133174.txt.gz · Dernière modification : 06/2011 (modification externe)