danisahne-mod ..::Developer::.. >>
NEW: ds-mod at Sourceforge.net (UNDER CONSTRUCTION; not able to build firmware images yet):
danisahne-mod at Sourceforge.net >>
New Patch available for latest firmwares “Fon WLAN 7170”, “SL WLAN”, “WLAN 3030” and “WLAN 3070”.
-- danisahne, 17.11.2006
ds-mod is currently under heavy development. The next release will be based on ipkg... Therefore the whole buildroot has to be rewritten. This is what I've been doing in my spare-time for the last weeks and that I will continue until it is finished (I plan for this year). Due to new firmware releases the mod does not compile for “300IP as Fon”, “Fon WLAN 7170”, “SL WLAN”, “WLAN 3030” and “WLAN 3070” any more. As I want to focus on the new ds-mod buildroot, patches for ds-0.2.9 fixing these issues are welcome. Please submit these patches via PM.
More details @ software:ds-mod:start (German)
-- danisahne, 13.11.2006
danisahne mod (short: ds-mod) is a bunch of scripts and precompiled binaries for your Fritzbox. It addresses not only linux profis, but also users having no idea how vi works. Therefore ds-mod comes with a webinterface, that runs parallel to the original one, and has cygwin support for compiling a modified image with cygwin.
Special thanks to kay1234 for helping me with the translation.
This mod is distributed without any warranty (not even the implied warranty of merchantability or fitness for a particular purpose). Use this mod on your own risk! Note, that loading ds-mod will void your warranty
If you don't know howto recover your device in case of failure, you probably should stop reading at this point. Do NOT bother AVM's support with problems caused by the mod.
ATTENTION: For security reasons I do NOT recommend exposing the webinterface of your box (original or ds-mod) to the internet. ds-mod webinterface is designed with respect to functionality not security, although there are some security checks.
ATTENTION: Be careful with iptables firewalls. Always test them in RAM first, before you write the rules to flash. Otherwise you may have to recover your box, because one can lock out himself quite easily (unless you got a serial console).
Table of contents
- Known Bugs
- Source Code
+ nfs mount
+ lzma support
- iptables 1.3.5
- busybox 1.2.1
- bftpd 1.3
- checkmaild 0.2
- callmonitor 1.5
- dnsmasq 2.26
- dropbear 0.48.1
- telefon 0.3
- vpnc 0.3.3
- firewall-cgi 0.5
- samba 2.0.10
- screen 4.0.2
- syslogd-cgi 0.2
- wol-cgi 0.5
- openvpn 2.1_beta14
- transmission 0.5 (binary only)
- web frontend
- downgrade mod
All services provided by packages are accessible from the (W)LAN side by default and not from the internet. You can achieve that by creating appropriate port forwardings (which I do not recommend).
- bftpd: Small FTP server to easily exchange files. Files are uploaded to RAM, so your box will crash if you try to upload a large file. In order to protect the FTP account with a password, you have to disable anonymous access and define a password with `modpasswd ftp' for the user ftp.
- checkmaild: Check email accounts for new mails while your PC is turned off (indicated by Fritzbox LEDs)
- callmonitor: execute any shell command (e.g. wake-on-call) and launch message popups (e.g. on the D-Box or XBox) in the event of an incoming or outgoing call to/from specific telephone numbers.
- dnsmasq: DNS and DHCP server; can handle static leases (in contrary to the DHCP server of the Box). Furthermore, own local DNS names might be added.
- dropbear: SSH server for secure remote login (like telnet, but encrypted).
- telefon: Makes the output of the telephone daemon available to other packages (e.g. callmonitor). This package is usually only required by other packages and not used stand-alone. It is not required by the new callmonitor 1.0 any more.
- vpnc: Cisco compatible VPN client.
- firewall-cgi: Scripts to control a iptables firewall.
- syslogd-cgi (Linux Magazin (German)): Logging of the Box might be sent to remote hosts using syslogd.
- wol-cgi: Web interface for Wake-on-LAN using ether-wake
RELEASE NOTES: Fixed favicon support and upgraded busybox to 1.2.1. This new Version of busybox is still smaller, even when activating losetup and swaponoff (and thats why i've choosen to select these applets). ptweety's swap patch will be integrated in the next release.
The scripts in this mod are based on mod-0.57 from haveaniceday, the fbox buildroot from Enrik and last but not least my own work It should compile for and run on almost all 4MB- and 8MB-flash-boxes.
Requires ncurses-devel for `make menuconfig':
- Download ds-0.2.x.tar.bz2 (don't use FAT or NTFS partitions for compiling the mod)
- Open a shell and change to the directory you just downloaded the tarball to:If you don't have ncurses-devel, you can also use `make config' instead of `make menuconfig'Code:tar -xvjf ds-0.2.x.tar.bz2 cd ds-0.2.x/ make menuconfig make
dsl123 has made a nifty little Howto compile danisahne-mod with Cygwin (German). Thanx dsl123!
Because some users happen to do this error over and over again: Use the Cygwin-tar to unpack the mod tarball in Windows. Never ever use other tools like WinZIP or WinRAR (they can't deal with symlinks). / Weils immer wieder vorkommt: In Cygwin unbedingt wie in der Anleitung beschrieben das Cygwin-tar verwenden, niemals mit einem anderen Programm unter Windows entpacken!
- Download Cygwin installer setup.exe from http://www.cygwin.com/
- Install Cygwin with the following packages:
- Archive -> unzip
- Devel -> gcc, libncurses-devel, make, patchutils
- Interpreters -> perl
- Web -> wget
- Download ds-0.2.x.tar.bz2 to your Cygwin-home directory (depending on your installation, e.g. C:\Cygwin\home\<Windows-user>\)
- Start Cygwin shell and type:Code:tar -xvjf ds-0.2.x.tar.bz2 cd ds-0.2.x/ make menuconfig make
Upload the created image firmware_*.image as firmware update using the webinterface of your box. `make recover' is not supportet in Cygwin. If your debug.cfg is not empty I suggest to empty it (echo > /var/flash/debug.cfg). This file is not used by danisahne-mod and is available as a "autorun script" like before, but make sure your debug.cfg does not interfere with the mod. After a few minutes you should be able to browse http://fritz.box:81/ or http://<ip-of-box>:81/. Follow the instructions on these webpages to complete the installation.
The mod saves the whole configuration to /var/flash/ds_mod (0x3c), which is automatically created at boot time. To completely remove danisahne mod you should run 'moduninstall' and upload a unmodified original firmware immediately.
Please send me your feature request as PM to danisahne.
- dynamic packages (reload mod)
- ? ipv6 mod von owb ?
- ? stunnel ?
- NTP server
- Umfassende Patches von ptweety integrieren: xmail, Swap, knockd
- openvpn mit lzo von knox
- tinyproxy mit filter
- Upgrades: bftpd
5. Known Bugs
Please submit bugs via PM to danisahne.
At the moment, the following packages are being worked on or are available which are not maintained by myself:
In case of questions or problems concerning these packages, please contact the corresponding author. The following packages are maintained by myself or are being planned:
- callmonitor (Author: buehmann; Status: integrated)
- telefon (Author: buehmann; Status: integrated)
- checkmaild (Author: olistudent; Status: integrated)
- mc (Author: olistudent; Status: integrated)
- syslogd-cgi (Author: olistudent; Status: integrated)
- vpnc (Author: eresleo; Status: integrated)
- openvpn (Author: lord-of-linux; Status: integrated)
- ntpd (Status: planned)
- poptop (Status: planned)
- imond & telmond (Status: planned)
- bftpd (Status: integrated)
- dnsmasq (Status: integrated)
- dropbear (Status: integrated)
- samba (Status: integrated)
- screen (Status: integrated)
- wol-cgi - Wake-on-LAN web interface (Status: integrated)
- firewall-cgi - Firewall-Framework (Status: integrated)
The configuration is being stored in an own character device /var/flash/ds_mod. It contains a tar archive of the folder /var/tmp/flash (same as /tmp/flash due to symlink, do not mix up with /var/flash !!!). The archive is being unpacked at boot time. Therefore, all files that shall survive a reboot might be copied to /tmp/flash followed by the command 'modsave flash'. I have chosen a hard limit of 30KB as a default, which might be changed with
The "security level" is a security barrier which restricts the editing of configuration files over the web interface and can be changed like this:Code:modconf set mod MOD_LIMIT=<bytes> modsave
The default security level is 1.Code:echo x > /tmp/flash/security modsave # with x being one of the following values: # 0 : no restrictions # 1 : only configuration files without shell commands might be edited # 2 : no configuration files might be edited
The security level also defines, which scripts of the category "Extras" are allowed to be executed and which are not.
Wrapper scripts for text files (do not require 'modsave'):
- Files in /var/flash: use nvi
e.g. nvi /var/flash/debug.cfg
- Files in /tmp/flash: use mvi
e.g. mvi /tmp/flash/my_file.txt
For further information please read the thread danisahne-mod ..::Developer::.. (German)
8. Source Code
Source code can be compiled as follows:
The toolchain will automtically be build if there was no external compiler specified. The toolchain only can be build with:Code:make menuconfig make precompiled
All source packages and tarballs can be collected with:Code:make menuconfig make toolchain make libs
If you just want to compile the tools use:Code:make sources
ds-0.2.9-opensrc-04.01.tar.bz2 for boxes:
ds-0.2.9-opensrc-04.06.tar.bz2 for boxes:
- Fon ATA
- 300IP as Fon
- Fon 5010
- Fon 5012
- Fon 5050
- Fon WLAN 7050
- Fon WLAN 7170
- SL WLAN
- WLAN 3030
- WLAN 3050
- WLAN 3070
- Please apply patch ds-0.2.9-p2.patch for the new firmwares (thanks olistudent). This also fixes the 300ip firmware (thanks b.sander). Learn here how to apply this patch (German).
- For b.sander's updates you need to run `make precompiled' after applying the patches.