DD-WRT KongMod update build 17940
November 29th, 2011For more information visit: MyOpenRouter
Supported Models: WNR3500L V1 | RT-N16 | WRT610N V1/V2 | E3000 | E4200 | F7D4302
For more information visit: MyOpenRouter
Supported Models: WNR3500L V1 | RT-N16 | WRT610N V1/V2 | E3000 | E4200 | F7D4302
I’m going to explain in a few simple steps how to setup a Streaming Media Server using my dd-wrt build with integrated MiniDLNA.
1. Enabling USB Storage Support
There is not much to say here except. In my case I choose /jffs as mountpoint. JFFS is the prefered moint in case you want to make use of the jffs filesystem which is used to prevent excessive wear from flash cells. The mountpoint /opt is used whenever you want to use optware packages. Optware packages include a install script that usually install “optware”packages in the directory /opt, dd-wrt checks the location /opt for apps, scripts etc, that’s how optware basically works.
With the latest builds usb media will also be automatically mounted to the mointpoint /mnt. So if you leave everything empty you should find the contents of your drives partitions under /mnt/disc<x>_part<y> where x is the disc number and y is the partition number. Thus if you have a single drives with 2 partitions attached. They will be automatically mounted to:
/mnt/disc0_part1
/mnt/disc0_part2
2. Enable DLNA Server
No it is time to enable the DLNA Server. Fill in the neccessary information for minidlna by specifying the Server Identification. This is the string that will later be displayed by your media clients.
Now enter the directories. As noted earlier I told dd-wrt to moint my partition, that contains the videos, to /jffs. I placed my videos in a directory share/video, since the partition was mounted to /jffs the full path to my videos is /jffs/share/video. If you remove this drive and attach it to windows you would find the files for example under D:\share\video. Same applies to pictures etc.
Now you can specify an update intervall. In my case I set it to 240s. So when I copy a new video to the router e.g. via samba share it will take up 240s until this new files is added to minidlnas database, and until the client sees it. Normally you can leave this field empty, since the default value should be fine.
A more important setting is the DB Path . The db path is the place where minidlna stores the index database. The default is to store it in /tmp directory which means it is purely inside the routers ram. Now if you have lots of media files this db can get very big and consume several megabytes, the consequence of that is that you run out of ram on the router and the router will be slowed down. In extreme cases the router will not be able to handle new connections etc. My advice, if you have more then 500 files in those directories store the db somewhere on the external media.
3. Start your client and check it is working. E.g. Windows 7 Media Player
FAQ:
1) How do I know minidlna is running?
Check “Status->Sysinfo” under Services you will find the status of minidlna
2) How long does it take to index the directories
This depends on the amount of files. A rough guess 1min for 500 files.
3) How can I debug minidlna
Logon to the router e.g ssh and make sure minidlna is stopped, e.g. killall minidlna. Now start minidlna in debug mode: /usr/sbin/minidlna -R -d -f /tmp/minidlna.conf
I have just integrated another feature. Here comes a proxy server with default rules for adblocking and tracking mechanisms like Google Analytics, Facebook Ilike Button…
This does not mean you cannot use Facebook or Google anymore, this just blocks tracking through 3rd party sites.
NOTE: You may have seen scripts that download host lists onto your router in order to redirect hostnames from well known adblocking servers to your routers ip . While this is an effective method to avoid certain ads it is the biggest security hole for your router. You have no control over the external host list, in case it was manipulated you are going to be redirected like a fool, to prepared servers that are just waiting to load you with malware etc.
Thus if you have never heard of privoxy you should start your browser and direct it to http://www.privoxy.org/.
Click to enlarge
The image shows the configuration page which allows to enable privoxy. In standard mode it will just act as a normal proxy that filters ads and other annoying content. In this mode you have to setup each clients browser to use the proxy: <routersip>:<port> e.g. 192.168.1.1 : 8118
In transparent mode all http traffic will be intercepted by the proxy, and every client will connect through the proxy, this is useful if you want to enforce the rules you defined. Lets say for example you want to filter out adult content and don’t want your kids to bypass your filter. The Custom Configuration is needed if you want to place your filter rules on a removable writeable media so you can create your own set of rules. To do this you would just use the standard config located under /tmp/privoxy.conf copy and paste the content and replace the paths to the actionfiles.
Note: In transparent mode the access to the dd-wrt page goes through the proxy, if the proxy dies for whatever reason you cannot reach the routers webif. In this case you can logon to through a shell and disable transparent mode with the command:
nvram set privoxy_transp_enable=0
nvram commit
Then restart the router. This will stop the firewall rule that enforces transparent mode.
Download Broadcom Build (8MB Units 47xx: Netgear WNR3500L, Asus RT-N16, Linksys WRT610N V1/V2):
Sollte der Mediaplayer unter Windows 7 keine DLNA Server finden sollte man prüfen ob der Dienst UPnP Gerätesost und SSDP Suche gestartet sind.
See myopenrouter announcement for a new set of my dd-wrt mods:
I’m currently testing a new feature: filtering ads directly on the router
The next release will have privoxy onboard + default rules that block most ads before they reach your client computers.
This usually increases surfing speed and enhances security since ad servers are often used to send malware to browsers.
With custom rules one will be able to filter adult, gaming … sites. A transparent mode can be activated, which makes sure clients cannot bypass the filter.
Here is a little tutorial on how to create a custom configuration for samba. I assume you already have my dd-wrt mod installed. Once you enable Samba under Services->NAS you will see this Form:
Click to enlarge
Now to create a custom configuration you can just use the smb.conf which is created once you setup samba with public share. This file is located under /tmp/smb.conf. In the following example I added two users with special shares and changed the location of the public share. In addition to that it is neccessary to create the appropriate directorys on your usb drive ( in this example /jffs/boss, /jffs/cat, /jffs/public) :
[global]
server string = Kong
workgroup = Secure
interfaces = br*
bind interfaces only = Yes
map to guest = Bad User
smb passwd file = /var/samba/smbpasswd
private dir = /var/samba
passdb backend = smbpasswd
log file = /var/smbd.log
max log size = 1000
printing = none
load printers = No
usershare allow guests = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY[Boss]
comment = Boss share
path = /jffs/boss
read only = No
guest ok = No
valid users = Boss
force user = root[Cat]
comment = Cat share
path = /jffs/cat
read only = No
guest ok = No
valid users = Cat
force user = root[Public]
comment = Public Share
path = /jffs/public
read only = No
guest ok = Yes
force user = root
Unless you know what you are doing you should keep the default options in global section, but you probably want to change some values like your server string and workgroup . Once you copied your config into the Custom Configuration textbox press Apply Settings. After that you can access your new shares.
Update 5th May 11: Latest builds require the option force user = root since they don’t mount partitions using option user
Update 3rd June 11: Kong builds >= 17140 have a new samba gui, there you can create multiple shares + users without the need of a custom config.
If you have trouble getting your usb drive to work with the wnr3500l you may want to test these steps:
Here comes another release of my dd-wrt mod, now based on dd-wrt build 15000.
New:
-attempt to cleanly umount usb devices on reboot
Fixed:
-correctly create second samba user when using custom configuration
-fix black on black bug in nas section under safari/konqueror(using webkit)
Downloads:
I have updated my dd-wrt mod (build 14584) with included samba3 and minidlna. This build is thoroughly tested on a WNR3500L, but should work on all Broadcom 47xx Units with 8MB flash ( I have reports that it is working fine on Asus RT-N16, Linksys WRT610N V2 ).
Changes compared to my last build.
New features:
Fixes:
Removed:
Known Issues:
P.S. For additional info , known issues etc. checkout: Myopenrouter