User Tools

Site Tools


openwrt_router_as_itunes_proxy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

openwrt_router_as_itunes_proxy [2013/09/28 17:06] (current)
Line 1: Line 1:
 +====== 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:
 +
 +  -install avahi:<​code>​
 +ipkg install http://​nthill.free.fr/​openwrt/​ipkg/​testing/​libexpat_1.95.8-1_mipsel.ipk
 +ipkg install http://​nthill.free.fr/​openwrt/​ipkg/​testing/​libdaemon_0.8-1_mipsel.ipk
 +ipkg install http://​nthill.free.fr/​openwrt/​ipkg/​testing/​libavahi_0.5-1_mipsel.ipk
 +ipkg install http://​nthill.free.fr/​openwrt/​ipkg/​testing/​libgcc_3.4.4-2_mipsel.ipk
 +ipkg install http://​nthill.free.fr/​openwrt/​ipkg/​testing/​avahi-daemon_0.5-1_mipsel.ipk
 +</​code>​
 +  - create /​etc/​avahi/​services/​itunes.service:<​code>​
 +<?xml version="​1.0"​ standalone='​no'?><​!--*-nxml-*-->​
 +<​!DOCTYPE service-group SYSTEM "​avahi-service.dtd">​
 +<​service-group>​
 + <​name replace-wildcards="​yes">​iTunes Server on %h</​name>​
 +  <​service>​
 +   <​type>​_daap._tcp</​type>​
 +   <​port>​3689</​port>​
 +  </​service>​
 +</​service-group>​
 +</​code>​
 +  - put this at the end of /​etc/​init.d/​S99done:<​code>​
 +[ ! -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
 +</​code>​
 +  - make cert:<​code>​
 +cd /​etc/​dropbear
 +dropbearkey -t rsa newkey
 +</​code>​
 +  - put the key into authorized_keys2 on the iTunes server
 +  - launch the port forward with:<​code>​
 +/​usr/​bin/​ssh -T -i /​etc/​dropbear/​newkey -g user@your.itunes.server -L 3689:​127.0.0.1:​3689 &
 +</​code>​
 +  - figure out how to get it to run automatically
  
openwrt_router_as_itunes_proxy.txt ยท Last modified: 2013/09/28 17:06 (external edit)