La Fibre

Datacenter et équipements réseaux => Routeurs => Orange fibre Remplacer la LiveBox par un routeur => Discussion démarrée par: xolaam le 19 juillet 2019 à 23:45:55

Titre: Remplacer Livebox avec Netgear R8000 + Advanced Tomato
Posté par: xolaam le 19 juillet 2019 à 23:45:55
Je tente depuis plusieurs heures de configurer mon routeur pour qu'il remplace ma Livebox 4.

J'ai lu de nombreux posts sur ce forum et ailleurs pour tenter d'y arriver, notamment ce tuto sur Advanced Tomato (https://lafibre.info/remplacer-livebox/tuto-mode-dhcp-sur-firmware-tomato/) et le post sur la nouvelle option 90 (https://lafibre.info/remplacer-livebox/cacking-nouveau-systeme-de-generation-de-loption-90-dhcp/).

Après de nombreuses tentatives, le statut du DHCP indique Renewing....

(https://i.imgur.com/MrsJkJH.jpg)

Matériel


Config



WAN Settings

(https://i.imgur.com/gE52vM9.jpg)

VLAN Settings

(https://i.imgur.com/eVmoW0G.jpg)

Script init

user=fti/xxxxx
pass=xxxxx
maclivebox=AA:BB:CC:DD:EE:FF
verlivebox=4

cp -a /sbin /tmp/sbin_rw
mkdir /tmp/sbin
ln -s /bin/busybox /tmp/sbin/udhcpc
rm /tmp/sbin_rw/udhcpc

cat << \EOF > /tmp/sbin_rw/tohex
#!/bin/sh
for h in $(echo $1 | sed "s/\(.\)/\1 /g")
do
  printf "%2502x$2" \'$h
done | sed "s/$2$//"
EOF

maclivebox=$(echo $maclivebox |  tr '[a-z]' '[A-Z]')
cat << EOF > /tmp/sbin_rw/udhcpc
#!/bin/sh
if echo \$* | grep vlan832
then
  r=a1b2c3d4e5f6g7h8i9
  s=3c12\$(tohex \$r)0313\$(tohex \${r:15})
  h=\$(echo -n \${r:15}$pass\$r | md5sum | cut -c1-32)
  exec /tmp/sbin/udhcpc \$* \\
  -x 0x3c:\$(tohex sagem) \\
  -x 0x3d:01${maclivebox//:/} \\
  -x 0x4d:\$(tohex +FSVDSL_livebox.Internet.softathome.Livebox$verlivebox) \\
  -x 0x5a:00000000000000000000001a0900000558010341010d\$(tohex $user)\$s\$h
fi
exec /tmp/sbin/udhcpc \$*
EOF

chmod +x /tmp/sbin_rw/tohex
chmod +x /tmp/sbin_rw/udhcpc
mount -o bind /tmp/sbin_rw /sbin

service wan stop
service wan start


Script firewall

vconfig set_egress_map vlan832 0 6
vconfig set_egress_map vlan832 1 0
iptables -t mangle -A POSTROUTING -j CLASSIFY --set-class 0000:0001
iptables -t mangle -A POSTROUTING -o vlan832 -p udp --dport 67 -j CLASSIFY --set-class 0000:0000

Est-ce que quelqu'un peut me donner une piste sur ce qui pourrait coincer ? Notamment, je me demande si je dois remplacer l'adresse MAC du WAN Port avec celle de la Livebox sur la page 'MAC Address'.

En me connectant en SSH, je peux vérifier que le script s'est exécuté car le fichier `/tmp/sbin_rw/tohex` a bien été crée. Un `ps w | grep dhcp` répond ceci:

1124 root      1388 S    udhcpc -i vlan832 -b -s dhcpc-event -H unknown -O 33 -O 121 -O 249 -m -S -p /var/run/udhcpc-wan.pid
Titre: Remplacer Livebox avec Netgear R8000 + Advanced Tomato
Posté par: zethis le 22 juillet 2019 à 14:26:00
Hello, essaye de croiser avec ce tuto: https://lafibre.info/remplacer-livebox/tuto-mode-dhcp-sur-firmware-tomato/
il doit te manquer l'injection des identifiants.