Difference between revisions of "Modem ADSL SpeedTouch Home"

From YobiWiki
Jump to navigation Jump to search
m
 
m (Reverted edits by Etegohy (Talk) to last revision by PhilippeTeuwen)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
''Converted with [[MediaWiki#HTML-WikiConverter|HTML::WikiConverter::MediaWiki]] from my old phpwiki site''
 
''Converted with [[MediaWiki#HTML-WikiConverter|HTML::WikiConverter::MediaWiki]] from my old phpwiki site''
 
----
 
----
  +
===Intro===
  +
 
Le modem ADSL Alcatel SpeedTouchHome avec connexion Ethernet est en fait un routeur qui est capable de faire du ''NAT'' ainsi que du ''port forwarding'', de servir de serveur DHCP et DNS... <br />Il permet même de garder sa connexion active donc plus besoin de PPTP ou PPPoE, il se connecte lui-même en PPPoA au provider ADSL et vos machines deviennent de simples clients DHCP. <br />Bref il possède les caractéristique du SpeedTouchPro et il suffit de le débrider pour accéder à ces fonctions.
 
Le modem ADSL Alcatel SpeedTouchHome avec connexion Ethernet est en fait un routeur qui est capable de faire du ''NAT'' ainsi que du ''port forwarding'', de servir de serveur DHCP et DNS... <br />Il permet même de garder sa connexion active donc plus besoin de PPTP ou PPPoE, il se connecte lui-même en PPPoA au provider ADSL et vos machines deviennent de simples clients DHCP. <br />Bref il possède les caractéristique du SpeedTouchPro et il suffit de le débrider pour accéder à ces fonctions.
   
=== [SpeedTouchHomeToPro Débrider le SpeedTouchHome en SpeedTouchPro] ===
+
=== [[SpeedTouch Home To Pro|Débrider le SpeedTouchHome en SpeedTouchPro]] ===
   
=== [SpeedTouchHomeTo510 Transformer le SpeedTouchHome en SpeedTouch510] ===
+
=== [[SpeedTouch Home To 510|Transformer le SpeedTouchHome en SpeedTouch510]] ===
   
 
* Voir aussi [http://www.forpage.com/forum/viewtopic.php?topic=179&forum=17&4 http://www.forpage.com/forum/viewtopic.php?topic=179&amp;forum=17&amp;4]
 
* Voir aussi [http://www.forpage.com/forum/viewtopic.php?topic=179&forum=17&4 http://www.forpage.com/forum/viewtopic.php?topic=179&amp;forum=17&amp;4]
Line 42: Line 44:
 
à lancer via un cron toutes les 5 mins
 
à lancer via un cron toutes les 5 mins
   
  +
<source lang=bash>
<nowiki>
 
#!/bin/bash
+
#!/bin/bash
  +
 
LASTIPFILE="/var/log/lastip.log"
+
LASTIPFILE="/var/log/lastip.log"
LOGFILE="/var/log/ippub.log"
+
LOGFILE="/var/log/ippub.log"
DEBUG="false"
+
DEBUG="false"
USER="TPhilippe"
+
USER="TPhilippe"
PASSWD="xxxxxx"
+
PASSWD="xxxxxx"
ZONE="*.teuwen.org"
+
ZONE="*.teuwen.org"
  +
 
read_ippub () {
+
read_ippub () {
# Pour lire l'IP lorsque le modem est en bridge et que le PPP aboutit à l'ordi:
+
# Pour lire l'IP lorsque le modem est en bridge et que le PPP aboutit à l'ordi:
NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)
+
NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)
  +
 
# Pour lire l'IP sur un modem SpeedTouch (ici pour un compte ADSL Skynet)
+
# Pour lire l'IP sur un modem SpeedTouch (ici pour un compte ADSL Skynet)
# NEWIP=$(lynx http://10.0.0.138/cgi/router/index.htm -dump|gawk '$1 ~ /Skynet/{print $2}')
+
# NEWIP=$(lynx http://10.0.0.138/cgi/router/index.htm -dump|gawk '$1 ~ /Skynet/{print $2}')
  +
 
# Pour lire l'IP sur un modem/access-point Philips
+
# Pour lire l'IP sur un modem/access-point Philips
# echo -n "pws=mypassword"| POST http://192.168.1.1/cgi-bin/login.exe
+
# echo -n "pws=mypassword"| POST http://192.168.1.1/cgi-bin/login.exe
# sleep 1
+
# sleep 1
# NEWIP=$(wget -O - -q http://192.168.1.1/status_main.stm|grep "wan_ip="|sed 's/^.*"\(.*\)".*$/\1/')
+
# NEWIP=$(wget -O - -q http://192.168.1.1/status_main.stm|grep "wan_ip="|sed 's/^.*"\(.*\)".*$/\1/')
# sleep 1
+
# sleep 1
# wget -O /dev/null -q http://192.168.1.1/cgi-bin/logout.exe
+
# wget -O /dev/null -q http://192.168.1.1/cgi-bin/logout.exe
}
+
}
  +
 
update_ippub () {
+
update_ippub () {
# Il faut un wget SSL-capable si on veut communiquer en HTTPS. Le paquet wget-ssl semble avoir disparu de la Debian...
+
# Il faut un wget SSL-capable si on veut communiquer en HTTPS. Le paquet wget-ssl semble avoir disparu de la Debian...
MSG=$(wget -q --output-document=- --http-user=$USER --http-passwd=$PASSWD "https://dynamic.zoneedit.com/auth/dynamic.html?host=$ZONE&amp;dnsto=$NEWIP")
+
MSG=$(wget -q --output-document=- --http-user=$USER --http-passwd=$PASSWD "https://dynamic.zoneedit.com/auth/dynamic.html?host=$ZONE&amp;dnsto=$NEWIP")
}
+
}
  +
 
  +
 
read_ippub # Lit l'IP courante
+
read_ippub # Lit l'IP courante
$DEBUG &amp;&amp; echo "Newip: $NEWIP"
+
$DEBUG &amp;&amp; echo "Newip: $NEWIP"
# LASTIPFILE doit exister et contenir qqch
+
# LASTIPFILE doit exister et contenir qqch
if [ ! -s $LASTIPFILE ] || {
+
if [ ! -s $LASTIPFILE ] || {
. $LASTIPFILE
+
. $LASTIPFILE
$DEBUG &amp;&amp; echo "Lastip: $LASTIP"
+
$DEBUG &amp;&amp; echo "Lastip: $LASTIP"
[ "$NEWIP" != "$LASTIP" ] # ce qqch doit être égal à l'IP courante
+
[ "$NEWIP" != "$LASTIP" ] # ce qqch doit être égal à l'IP courante
}
+
}
then # sinon
+
then # sinon
date &gt;&gt; $LOGFILE
+
date &gt;&gt; $LOGFILE
update_ippub # met à jour ZoneEdit
+
update_ippub # met à jour ZoneEdit
$DEBUG &amp;&amp; echo "Message: $MSG"
+
$DEBUG &amp;&amp; echo "Message: $MSG"
echo "$MSG" &gt;&gt; $LOGFILE
+
echo "$MSG" &gt;&gt; $LOGFILE
echo &gt;&gt; $LOGFILE
+
echo &gt;&gt; $LOGFILE
if echo "$MSG" | grep "SUCCESS"
+
if echo "$MSG" | grep "SUCCESS"
then
+
then
$DEBUG &amp;&amp; echo "Update of the IP info..."
+
$DEBUG &amp;&amp; echo "Update of the IP info..."
echo "LASTIP=$NEWIP" &gt; $LASTIPFILE
+
echo "LASTIP=$NEWIP" &gt; $LASTIPFILE
else
+
else
$DEBUG &amp;&amp; echo "There was an error, I will not touch $LASTIPFILE"
+
$DEBUG &amp;&amp; echo "There was an error, I will not touch $LASTIPFILE"
exit 1
+
exit 1
fi
+
fi
fi
+
fi
exit 0</nowiki>
+
exit 0
  +
</source>
   
 
----
 
----
   
==== Gros hack tant que <span class="wikiunknown"><u>LaTribu</u>[LaTribu?action=create [[Image:uww.png|?]]]</span> donne de mauvaises IP ====
+
==== Gros hack tant que LaTribu donne de mauvaises IP ====
   
 
à lancer via un cron toutes les 5 mins
 
à lancer via un cron toutes les 5 mins
   
  +
<source lang=bash>
<nowiki>
 
#!/bin/bash
+
#!/bin/bash
NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)
+
NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)
if [ "${NEWIP%.*}" = "217.145.35" ]
+
if [ "${NEWIP%.*}" = "217.145.35" ]
then
+
then
ping -c 2 -q -n 139.165.32.13&gt;/dev/null
+
ping -c 2 -q -n 139.165.32.13&gt;/dev/null
if [ $? == 0 ]; then
+
if [ $? == 0 ]; then
if [ ! -e /tmp/latribu-ok ]; then
+
if [ ! -e /tmp/latribu-ok ]; then
echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP solved apparently...' phil
+
echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP solved apparently...' phil
touch /tmp/latribu-ok
+
touch /tmp/latribu-ok
fi
+
fi
exit 0
+
exit 0
else
+
else
rm -f /tmp/latribu-ok
+
rm -f /tmp/latribu-ok
echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP rejected!!' phil
+
echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP rejected!!' phil
poff; sleep 5; pon dsl-provider;
+
poff; sleep 5; pon dsl-provider;
exit 1
+
exit 1
fi
+
fi
fi
+
fi
exit 0</nowiki>
+
exit 0
  +
</source>
   
 
----
 
----

Latest revision as of 22:34, 24 November 2010

Converted with HTML::WikiConverter::MediaWiki from my old phpwiki site


Intro

Le modem ADSL Alcatel SpeedTouchHome avec connexion Ethernet est en fait un routeur qui est capable de faire du NAT ainsi que du port forwarding, de servir de serveur DHCP et DNS...
Il permet même de garder sa connexion active donc plus besoin de PPTP ou PPPoE, il se connecte lui-même en PPPoA au provider ADSL et vos machines deviennent de simples clients DHCP.
Bref il possède les caractéristique du SpeedTouchPro et il suffit de le débrider pour accéder à ces fonctions.

Débrider le SpeedTouchHome en SpeedTouchPro

Transformer le SpeedTouchHome en SpeedTouch510

Autres pages relatives au débridage:

Pages utiles

Qqs liens à trier:

Scripts:

voir aussi InternetScripts

Pour mettre le DNS à jour via ZoneEdit

à lancer via un cron toutes les 5 mins

#!/bin/bash

LASTIPFILE="/var/log/lastip.log"
LOGFILE="/var/log/ippub.log"
DEBUG="false"
USER="TPhilippe"
PASSWD="xxxxxx"
ZONE="*.teuwen.org"

read_ippub () {
#   Pour lire l'IP lorsque le modem est en bridge et que le PPP aboutit à l'ordi:
    NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)

#   Pour lire l'IP sur un modem SpeedTouch (ici pour un compte ADSL Skynet)
#   NEWIP=$(lynx http://10.0.0.138/cgi/router/index.htm -dump|gawk '$1 ~ /Skynet/{print $2}')

#   Pour lire l'IP sur un modem/access-point Philips
#   echo -n "pws=mypassword"| POST http://192.168.1.1/cgi-bin/login.exe
#   sleep 1
#   NEWIP=$(wget -O - -q http://192.168.1.1/status_main.stm|grep "wan_ip="|sed 's/^.*"\(.*\)".*$/\1/')
#   sleep 1
#   wget -O /dev/null -q http://192.168.1.1/cgi-bin/logout.exe
}

update_ippub () {
#   Il faut un wget SSL-capable si on veut communiquer en HTTPS. Le paquet wget-ssl semble avoir disparu de la Debian...
    MSG=$(wget -q --output-document=- --http-user=$USER --http-passwd=$PASSWD "https://dynamic.zoneedit.com/auth/dynamic.html?host=$ZONE&amp;dnsto=$NEWIP")
}


read_ippub                      # Lit l'IP courante
$DEBUG &amp;&amp; echo "Newip: $NEWIP"
                                # LASTIPFILE doit exister et contenir qqch
if [ ! -s $LASTIPFILE ] || {
  . $LASTIPFILE
  $DEBUG &amp;&amp; echo "Lastip: $LASTIP"
  [ "$NEWIP" != "$LASTIP" ]     # ce qqch doit être égal à l'IP courante
  }
then                            # sinon
  date &gt;&gt; $LOGFILE
  update_ippub                  # met à jour ZoneEdit
  $DEBUG &amp;&amp; echo "Message: $MSG"
  echo "$MSG" &gt;&gt; $LOGFILE
  echo &gt;&gt; $LOGFILE
  if echo "$MSG" | grep "SUCCESS"
  then
    $DEBUG &amp;&amp; echo "Update of the IP info..."
    echo "LASTIP=$NEWIP" &gt; $LASTIPFILE
  else
    $DEBUG &amp;&amp; echo "There was an error, I will not touch $LASTIPFILE"
    exit 1
  fi
fi
exit 0

Gros hack tant que LaTribu donne de mauvaises IP

à lancer via un cron toutes les 5 mins

#!/bin/bash
NEWIP=$(ifconfig ppp0|grep "inet addr"|cut -c 21-40|cut -d " " -f 1)
if [ "${NEWIP%.*}" = "217.145.35" ]
then
    ping -c 2 -q -n 139.165.32.13&gt;/dev/null
    if [ $? == 0 ]; then
        if [ ! -e /tmp/latribu-ok ]; then
            echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP solved apparently...' phil
            touch /tmp/latribu-ok
        fi
        exit 0
    else
        rm -f /tmp/latribu-ok
        echo -e "$(date) \n\n $(ifconfig)" | mail -s 'Bad LaTribu IP rejected!!' phil
        poff; sleep 5; pon dsl-provider;
        exit 1
    fi
fi
exit 0

Philips SNA6500/18

Livré avec firmware 0.34c

Upgradé avec firmware 0.36a

Firmware 0.46??