Apologies my friends, it’s been awhile. I’ve been busy working on this London project, doesn’t leave a whole lot of time to write.
Anyways, the majority of my strictly security projects can be found at community.rapid7.com, things like the test enviornment write-ups, vulnerable device listings etc. so if that’s what you’re after, there’s more than enough info up there.
Recently I’ve been working on something a little bit outside the security realm… but not too far. As many of us do, I have a fairly extensive media collection that I’ve collected over the years. Everything from mp3’s, avi’s, pictures, whatever. I also have more than one medium on which I would like to enjoy said media: different laptops, TVs, peripherals, gaming systems, stereos and such. I’ve tried, failed, and tried again to connect all my devices together, and after hundreds of dollars spent and bashing my head against the wall for nearly a year I’ve got something stable, secure, and fast. Today’s post is how I did it.
Setting up a portable, heterogeneous, stable, secure streaming network
I’m in a (potentially) temporary space with macbooks, laptops, USB external drives, a PS3, and a 3g mobile wifi modem for internet access. I need to figure out a way to connect all these devices for fast, stable streaming around the house with 2 separate TV’s while still having something that I can just pick up and move if need be. I also need to get the 3g mobile wifi dongle to divy out internet to my 10+ networked devices while it only has the capacity to handle 5 total connections at any given time. I also have a girlfriend who, though extremely intelligent, is not a geek like myself and needs to be able to enjoy using this.
The Equipment (purchased and existing):
– Regular W7 laptop w 1.5 tb USB attached (dual 2ghz, 4 gb RAM)
– Netgear WNR3400 dual-band wireless router
– 2 500 Mbps Powerline Adapters
– Ancient VAIO netbook (centrino 933 mhz, 512 mb RAM)
– Macbook Pro (dual 2ghz, 4 GB RAM)
– Playstation 3
– 2 TV’s in separate rooms (HD in the living room, CRT in the bedroom, I’ll explain why later)
– 2 IPhone 4’s
– Various portable speakers w/Iphone/Ipod connections
– Three (the company name is actually 3, not 3 devices) Huaiwei E585 mobile wifi HSPA modem
(keep in mind I didn’t start with this specific hardware, nor was it all by choice)
1. Set up the (internal) network:
This part was easy. I set up standard AES256 on both networks (dual band router) and set different subnets; one for me, one for guests. I always call my networks something violent and foreboding, so I called the main one honey badger. Nobody fucks with a honey badger =].
2. Set up my first 2 devices:
After a little research, I learned that a PS3 uses the DLNA protocol for sharing and communication (info here)
Based on this, I had a goal for my first connection to be set up like so:
((Laptop w/USB attached storage)) <–wireless–> ((Router)) <–wireless–> ((PS3))
Next up was figuring out how to serve up the information from the laptop/w/attached USB storage over the protocol the Playstation communicates on. After a bit more research, I came across this PS3 Media Server>, which is an open-source, Java UPnP DNLA server that can transcode video on the fly. Siiick.
I downloaded and installed it on the W7 laptop and started it up without any configuration. I then turned on the Playstation and… gadzooks! It saw the server! This worked fine for streaming music, but I noticed when the video resolution got anything higher than standard 480p, the video would start to chop. If I was trying to do anything else in addition to streaming on the network, the video would become instantly unwatchable.
I did a little research, and remembered that wireless traffic is spread-spectrum and has a tendency to hop frequencies, most likely causing my problem, especially if both devices were sending and receiving wireless traffic simultaneously. Easy fix: wire one of the devices. Since my router and laptop were in the same room, I wired those together. HUGE difference…. but still not perfect. Every once in awhile it would still just drop altogether.
Time for more research. Turns out HD streaming can require up to 30 Mbps, and though my wireless connection can hit those speeds for a time, it can also be as low as 7.8 Mbps at times, and sometimes even drop completely. So my amazing 54 mbps honey badger was essentially worthless for streaming, weak.
So what are my options? I can wire it all the way through… but that would involve a mile of Cat-5 and mounting over doors and across hardwood, nope. Wireless repeater? Expensive and fucking complicated! Plus there’s still a chance I run into those same issues.
After even MORE research, I decided on powerline adapters. Before this project I didn’t even know these things existed, but they’re awesome. Essentially I can run the data through my powerlines by plugging them into the wall, plus you can set up security on them. They weren’t exactly cheap either, but they’re small, stable, secure and no over-air glitches. Super swik.
So far, my setup is looking something like this:
Not that complicated for the amount of work and money it’s taken so far if I’m honest. The rest of the devices in my network don’t really NEED to stream mass amounts of HD video, so just being connected to honey badger would suffice.
Step 3: The internet
This part took me the longest to figure out. Even with the network working so well, streaming internally, I still had to connect to a separate AP for internet. There are tons of articles and DIY’s on how to share a wired connections, wireless connections, and even using USB dongles, but NOTHING about using this mifi. I tried everything to bridge it wireless to wired, but apparently the modem lacks the routing capability to get the data from one connection to another.
Yesterday I thought… what if I just plug the mifi into the USB port? Low and behold, a little pop-up asks me if I want to install the drivers, so I do. And… hot damn, I can bridge the connections. The only downside to that is it only really works in Windows (I’m sure it works in Linux as well but I just couldn’t be bothered at this point. If you figure it out, please post) which means I’m going to have to find ANOTHER Windows laptop, or cripple one of my macbooks (not happening).
So I decided to install XP PE on the crappy old VAIO netbook I wasn’t really using. I plugged the mifi into the one USB port it had, installed the drivers, downloaded and installed the NIC driver and bridged the connections. I then took a length of cat5 and plugged one end into the VAIO, the other into the WAN port on my router, and threw it in the closet. I then took out my Iphone, connected it to honey badger and boom… online. Uber swik.
So at long last, I now had my internal network streaming media and the mifi distributing internet to all of the devices on honey badger. The basics of the final product looks something like this:
I then have other devices with network shares on honey badger as well, sharing music and pictures, all accessible to everything. The CRT TV I referred to earlier is actually a Bang and Olufsen Beocenter One, and rather than let it just sit there I thought I might use it (it’s actually pretty cool if you ask me). To do this I just got a VGA – RCA adaptor and 3.5 mini to RCA jack for the W7 laptop and connected it to the old girl, and for CRT the picture ain’t half-bad.
I also use VLC Media Player for literally everything. And because it’s open source, there have been some great projects centered around it, my favourite being the Remote Control app for Iphone. It’s basically a touch screen management console for your VLC Media Player that works over wifi. There are a bunch, and they are all fairly similar, but I like VLC Amigo because of the playlist management capabilities.
The best part about this whole setup is the core of it I can just pick up and move at any point and set up anywhere else in the world. Next up: timers for everything.
Thanks for reading. Hopefully the next post won’t be a year later.