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

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
maison2:configuration_open_wrt:installed [04/2012] – [prolific serial to usb interface] fredmaison2:configuration_open_wrt:installed [07/2013] (Version actuelle) – [Mettre à jour dynhost (ovh) en php] fred
Ligne 160: Ligne 160:
 ====== se faire un initapp ====== ====== se faire un initapp ======
 --> utiliser le fichier de demrrage de webbif : system->startup --> 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é) ====== ====== configuer le bouton pour le wifi sur le WL500GP (non utilisé) ======
Ligne 332: Ligne 393:
  
  
- + ====== 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.1333834480.txt.gz · Dernière modification : 04/2012 de fred