Alternative firmware for DNS-300

Here I plan to publish alternate firmware for DNS-300.

Fixed firmware of DLink

In this section you can find patched DLink’s firmware. I use version numbers as DLink original version + 4. For example my firmware 5.01 it is patched DLink’s firmware version 1.01.

ver. 5.01.004

Build on DLink firmware 1.01.003 (beta).
Download: dns300-5.01.004 (7 696 384)
Install: Just upgrade firmware by usual way on WWW interface. NOTE: it takes ~5 minutes on my device. Don’t interrupt this process, because you can get “bricked” DNS-300 if you interrupt flash process in the middle.

Configuration: To use mod_codeconv plugin for ProFTPd you need to make following changes in /etc/proftpd.conf.

CharsetLocal		"CP866"
CharsetRemote		"CP1251"

It’s settings specifically for russian users. If you use other language settings - you need to change this settings and maybe to renew libiconv.
Unfortunately it’s inpossible to modify DLink’s configuration software, because it’s proprietary and I don’t have sources. Also DNS-300 rewrites /etc/proftpd.conf on every restart, so we need to make changes in this file on every restart.
To make this configuration changes permanent, you need to add special file N91fix.sh to /etc/rc.d/rcS_up.d/. Content of N91fix.sh file:

sleep 10
echo CharsetLocal CP866 >> /etc/proftpd.conf
echo CharsetRemote CP1251 >> /etc/proftpd.conf
echo UseReverseDNS false >> /etc/proftpd.conf
killall proftpd
sleep 2
/usr/sbin/proftpd

To do it: you need to enable telnet access to your DNS-300, get root access and make following commands:

echo sleep 10 > /etc/rc.d/rcS_up.d/N91fix.sh
echo echo CharsetLocal CP866 \>\> /etc/proftpd.conf >> /etc/rc.d/rcS_up.d/N91fix.sh
echo echo CharsetRemote CP1251 \>\> /etc/proftpd.conf >> /etc/rc.d/rcS_up.d/N91fix.sh
echo echo UseReverseDNS false \>\> /etc/proftpd.conf >> /etc/rc.d/rcS_up.d/N91fix.sh
echo killall proftpd >> /etc/rc.d/rcS_up.d/N91fix.sh
echo sleep 2 >> /etc/rc.d/rcS_up.d/N91fix.sh
echo /usr/sbin/proftpd >> /etc/rc.d/rcS_up.d/N91fix.sh

chmod a+x /etc/rc.d/rcS_up.d/N91fix.sh

/etc/init.d/reboot

Changes: