Tutorial: PlexConnect with DD-WRT Router



Because of some demand, I thought to write a Tutorial on how to use a DD-WRT to auto-config all AppleTVs in a Network to connect to PlexConnect instead of Apple Trailers.

The Idea behind this is simple: The router intercepts all connections to trailers.apple.com and reroutes them to the PlexConnect server.

To achive this, first male shure, that PlexConnect works in the traditional way, with manually configuredd AppleTV.

Then, in DD-WRT, click the services-tab and under DNS make shure, that DNSmasq is enabled (should be on by default).

Under additional-options add the following line:


After a reboot of the router all should be done. Start your AppleTV, start the Trailers app and enjoy Plex in all it's glory…

I hope some of you guys can use this...


P.S. This should be possible with other Routers as well, I don't know any options for other Routers, but we could start a List here…


Thanks but there is already a tutorial, that i have linked to from the wiki:



Okay, I didn't know that…


You can also install plexconnect direcly on the router :)


^^^ ... care to explain how you've been able to do this ?


I can post it later :) But you will need:

usb port in the router

a usb flash drive

version of ddwrt 25400 and above, I got it working on 25760

And what chipset your router have ? 

Look here if you can find it ?


Mine is with ar71xx chipset. wndr3700

Cause you need to install optware, openwrt have been so nice to allow ddwrt to use their package system.


Cool that you can make it a host & instructions (full tutorial) would be great but no fanart is personally a deal breaker for me unless I used it for other users that don't require fanart.

Edit - ah you need a USB port on the router as well, bummer. Still cool for users with the required usb and base version of dd-wrt.

Opps. The links it not complete i pasted this guide here with complete links (wget commands they are shorted down): http://pastebin.com/xfqY3MpW
Well I think I got it all here. I am sorry if i repeated myself.
Confirmation on this guide:
All you need is copy paste.
You can try this on other routers. But remember change the wget to point to packages compiled for you router.
I can confirm its working on WNDR3700V1 (ar71xx based)
Should work on all other ar71xx based routers.
FOR AR71XX Based Routers ONLY. Confirmed working on ddwrt 25408 and 25760 But should work on all newr versions of DDWRT.
This will expand your routers storage for PlexConnect and install openwrt's package installer and allow you to install python and all packages listed here: https://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/
DO THIS ON YOUR OWN RISK. It is 100% safe :D
All changes is made to the USB, we binded to the system dirs. So you can always REMOVE startup script and the USB. Reboot and you are back to before you started this.
When you are done with step 10 you can confirm if opkg update is working or not.
If you get "OPKG NOT FOUND" there is no reason to do the rest. Maybe you missed a step, try a newer DDWRT version ?
If it does keep on and follow the last steps where we add a startupscript and the last things.
 1. You need a USB flash drive. Mine is 800~ MB and software: putty and WinSCP. Google it.
2. Format the USB stick as EXT3, using GPARTED, you can download and run a live version of ubuntu from the CD or from a virtual machine.
I formated my first partition as:
Filesystem: EXT3
Name: Data
size: 650 MB
and second partition as:
Filesystem: EXT3
Name: System
size: 150 MB
3. Webinterface
Services > USB
Core USB Support
USB Storage Support
Automatic Drive Mount
Services > NAS
Enable Sambe Sharing
Put the USB in the router and restart it.
Look in the webinterface that the 2 partitions on your USB drive is mounted as
7. Putty:
cd /tmp/mnt/sda1 
touch optware.enable 
cd /tmp/mnt/sda2 
mkdir etc opt root bin lib usr 
touch optware.enable 
chmod 755 etc opt root bin lib usr 
mkdir opt/lib 
chmod 755 opt/lib 
cp -a /etc/* /tmp/mnt/sda2/etc/ 
cp -a /bin/* /tmp/mnt/sda2/bin/ 
cp -a /lib/* /tmp/mnt/sda2/lib/ 
cp -a /usr/* /tmp/mnt/sda2/usr/ 
sleep 5 
mount -o bind /tmp/mnt/sda2/etc /etc 
mount -o bind /tmp/mnt/sda2/bin /bin 
mount -o bind /tmp/mnt/sda2/lib /lib 
mount -o bind /tmp/mnt/sda2/usr /usr 
mount -o bind /tmp/mnt/sda2/opt /jffs
cd /tmp 
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/uclibcxx_0.2.4-1_ar71xx.ipk
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/opkg_618-3_ar71xx.ipk
ipkg -d / -force-depends install  uclibcxx_0.2.4-1_ar71xx.ipk
ipkg -d / install libc_0.9.33.2-1_ar71xx.ipk 
ipkg -d / install opkg_618-3_ar71xx.ipk
You should see:
Connecting to openwrt. And downloading.
cat > /etc/opkg.conf << EOF 
src/gz packages http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/
dest root /opt 
dest ram /opt/tmp 
lists_dir ext /opt/tmp/var/opkg-lists 
umount /jffs 
mount -o bind /tmp/mnt/sda2/opt  /opt 
mount -o bind /tmp/mnt/sda2/root /tmp/root 
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib' 
opkg update
-You should see af running opkg downloading something and Update list of available packes.
IF ITS TELLING YOU OPKG NOT FOUND. Your version of DDWRT does not work with this or you missed a step. Remove the USB drive and format it. And try again, or try a other DDWRT version or skip this
-else keep going.
cat > /tmp/mnt/sda2/root/.profile << EOF 
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib' 
export PATH='/sbin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/usr/bin:/usr/sbin:/opt/usr/local/bin' 
export PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]' 
export TERMINFO='/opt/usr/share/terminfo' 
12. Webinterface. Administration > Commands
- iptables forward port 80 to 8080 and 443 to 8443, so we still can use the routers webinterface :)
- The rest is to mount our usb on boot. Without we will lose it everytime we reboot the router. 
-Change ip's and paste this:
#! /bin/sh 
sleep 2
iptables -t nat -A PREROUTING -s -d -p tcp --dport 80 -j DNAT --to-destination
iptables -t nat -A PREROUTING -s -d -p tcp --dport 443 -j DNAT --to-destination
sleep 10 
 if [ -f /mnt/sda1/optware.enable ]; then 
  if [ -f /mnt/sda2/optware.enable ]; then 
    mount -o bind /tmp/mnt/sda2/bin  /bin 
    mount -o bind /tmp/mnt/sda2/etc  /etc 
    mount -o bind /tmp/mnt/sda2/lib  /lib 
    mount -o bind /tmp/mnt/sda2/opt  /opt 
    mount -o bind /tmp/mnt/sda2/usr  /usr 
    mount -o bind /tmp/mnt/sda2/root /tmp/root 
   sleep 2 
 if [ -d /opt/usr ]; then 
  export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib' 
  export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin' 
13. Reb00t the router.
14. Putty:
opkg update
-You should see downloading and updated list.
cd /tmp
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/libc_0.9.33.2-1_ar71xx.ipk
opkg install libc_0.9.33.2-1_ar71xx.ipk
-And you are done with installing optware (opkg)
opkg install python
opkg install python-openssl
opkg install python-expat
opkg install nano
Transfer PlexConnect with the certificates to /tmp/root/
chmod -R +x /tmp/root/PlexConnect
chmod -R 755 /tmp/root/PlexConnect
-run plexconnect so it will create Settings.cfg
cd /tmp/root/PlexConnect
-wait few secs and stop it with
nano /tmp/root/PlexConnect/Settings.cfg
Port 80 and 443 to 8080 and 8443
enable_dnsserver = False
enable_plexconnect_autodetect = False
-And change to your routers lan IP
ip_plexconnect = 
CTRL + X and y for save. 
Services > Services
Change to routers IP and add this to the "Additional DNSMASQ Options"
And you are done.
Let me know if you got any questions. And share your result.


When trying to reach downloads.openwrt.org it takes forever, then I get an Operation timed out message. Can't connect to remote host. Seems as though the issue is the wget will not allow downloads from HTTPS sites. The links you gave in the tutorial are not working, as the files are on an HTTPS site, which means no wget.