User Tools

Site Tools


Using an OpenWRT router as an iTunes proxy

This isn't actually working properly, but it's kind of close. For some reason I can't get the ssh portfw to run automatically. It'd probably be smarter to do the portfw through iptables anyway, but I'm allergic to iptables.

setting up an openwrt router as an iTunes proxy:

  1. install avahi:
    ipkg install
    ipkg install
    ipkg install
    ipkg install
    ipkg install
  2. create /etc/avahi/services/itunes.service:
    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
     <name replace-wildcards="yes">iTunes Server on %h</name>
  3. put this at the end of /etc/init.d/S99done:
    [ ! -d /tmp/.ssh ] && {
            mkdir /tmp/.ssh
    [ -f /tmp/.ssh/known_hosts ] && {
            rm /tmp/.ssh/known_hosts
    ln -s /etc/known_hosts /tmp/.ssh/known_hosts
  4. make cert:
    cd /etc/dropbear
    dropbearkey -t rsa newkey
  5. put the key into authorized_keys2 on the iTunes server
  6. launch the port forward with:
    /usr/bin/ssh -T -i /etc/dropbear/newkey -g user@your.itunes.server -L 3689: &
  7. figure out how to get it to run automatically
openwrt_router_as_itunes_proxy.txt · Last modified: 2013/09/28 17:06 (external edit)