so da ich immer zu faul bin alles von hand zu machen nachdem ich mal wieder die sense neu aufgesetzt habe, habe ich mir ein script gebastelt was die arbeit für mich erledigt ,
ihr müsste lediglich eure echte MAC des WAN interfaces in dem script eintragen unter zeile 19
und ausführen.
#!/bin/sh
## ren22 08.07.11 ..NO WARRANTY OF USAGE!!! USAGE AT YOUR OWN RISK!!!
## die original MAC des WAN Interfaces eintragen bei Zeile 19 !!!
##getested unter pfSense 2.0-RC3 1g nanobsd "embebbed"
##2.0-RC3 (i386)
##built on Tue Jun 21 18:21:10 EDT 2011
##nanobsd (1g)
##
##erstelle WAN MAC patch datei
/bin/echo 'erstelle WAN MAC patch datei'
#
echo '--- /etc/inc/interfaces.inc 2011-07-06 20:52:28.000000000 +0000'> /tmp/wanif.patch
echo '+++ /etc/inc/interfaces.inc.gepatched 2011-07-06 19:54:25.000000000 +0000'>> /tmp/wanif.patch
echo '@@ -2596,7 +2596,7 @@'>> /tmp/wanif.patch
echo ' }'>> /tmp/wanif.patch
echo ' } else {'>> /tmp/wanif.patch
echo ' $mac = get_interface_mac($realhwif);'>> /tmp/wanif.patch
echo '- if ($mac == "ff:ff:ff:ff:ff:ff") {'>> /tmp/wanif.patch
echo '+ if ($mac == "nn:hh:tt:xx:yy:zz") {'>> /tmp/wanif.patch
echo ' /* this is not a valid mac address. generate a'>> /tmp/wanif.patch
echo ' * temporary mac address so the machine can get online.'>> /tmp/wanif.patch
echo ' */'>> /tmp/wanif.patch
echo "patche interfaces.inc"
patch < /tmp/wanif.patch /etc/inc/interfaces.inc
##
##erstelle phpreboot patch datei
/bin/echo 'erstelle REBOOT PHP patch datei'
echo '--- /usr/local/www/reboot.php 2011-07-06 19:51:50.000000000 +0000'> /tmp/rebootphp.patch
echo '+++ /usr/local/www/reboot.php.gepatched 2011-07-06 19:53:39.000000000 +0000'>> /tmp/rebootphp.patch
echo '@@ -67,6 +67,9 @@'>> /tmp/rebootphp.patch
echo ' echo "";'>> /tmp/rebootphp.patch
echo ' system_reboot();'>> /tmp/rebootphp.patch
echo ' $rebootmsg = gettext("The system is rebooting now. This may take one minute.");'>> /tmp/rebootphp.patch
echo '+ $output = shell_exec('\'route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.1.1\'');'>> /tmp/rebootphp.patch
echo '+ $output = shell_exec('\'curl -b cookies.txt -c cookies.txt -m 10 -d \"mCmInfoDsFreq1=xx\&mCmInfoUsId1=xx\" \"http\:\/\/192.168.100.1/goform/InitialScan\"\'');'>> /tmp/rebootphp.patch
echo '+'>> /tmp/rebootphp.patch
echo ' } else {'>> /tmp/rebootphp.patch
echo ' exit;'>> /tmp/rebootphp.patch
echo ' }'>> /tmp/rebootphp.patch
echo "patche reboot.php"
patch < /tmp/rebootphp.patch /usr/local/www/reboot.php
#echo "Fertig."
if [ -z "`pkg_info | grep '^curl'`" ]; then
echo " installing curl"
pkg_add -r curl
else
echo "curl bereits installiert!"
fi
echo "Fertig! :)"
das ganze pack ihr in eine .sh "shell" datei und geht im web interface menu auf "DIAGNOSTICS->COMMAND PROMPT" ,
dort unter "UPLOAD" das script uploaden, was nach /tmp geuploaded wird.
jetzt führen wir was ganze aus unter "EXECUTE SHELL COMMAND" , dor tippen wir ein:
sh /tmp/meindatei.sh
und dann auf "EXECUTE" klicken…
warten wir ein wenig falls curl nicht installiert ist bis wir eine rückmeldung bekommen "Fertig :)" sollte wenn alles orgnungsgemäß ablief erscheinen.
nun können wir wie oben beschrieben unter reboot das modem neustarten und die sense im eine neue ip bei dem kabel deutschland provider zubekommen.
grüsse ren22
rndwan.sh.txt