Accessing your Plex Media Server when not home

October 9th, 2011 | Tags: , , , ,

At home I have a nice setup with a Mac Mini as “Media/TV” client and a homemade Ubuntu NAS Server hosting media files to the client. A while back I discovered Plex. Plex is a great application for organizing media files and viewing them. For more information about Plex see Plex Homepage

The setup I use at home is:

  • Ubuntu NAS server – is running the Plex Media Server for Linux serving media to all my clients
  • Mac Mini Media Client – connected to the TV and running Plex Client
  • A MacBook Pro – where the Plex Client is installed
  • I also have an iPad and an iPhone running the Plex iOS client

Everything works fine when I’m connected on the same network as the Plex Media Server, but sometimes I’m traveling and still wants access to my media. After a bit of searching I found a perfect solution.

I found the solution here on the plex wiki.

By simply issuing two command line commands I’m able to access my home media from wherever I am.

The commands are:

dns-sd -R PMS _plexmediasvr._tcp . 32400 &
ssh -N -L 32400:localhost:32400 x.x.x.x -l username -p 22

These two line does the following:

  • The dns-sd command adds a dns entry to the local domain on the port which Plex searches
  • The ssh line opens a connection to your server, running Plex Media Server, over ssh and tunneling the previously add port to that computer

For a more detailed description of the commands see the Plex Wiki.

  1. January 16th, 2012 at 21:29
    Reply | Quote | #1

    Aloha dude! I’ve just stopped by to thank you for this cool site! Keep working that way.

    • March 10th, 2012 at 06:25
      Reply | Quote | #2

      Yes, SSH is very safe!And I am quite aware of how alternate ports for the sshd.Most of the time this guide is like renevint the wheel. I did not do the tunneling due to security issues in ssh but to pass through tightly secured proxies and firewalls. On larger companies, security department usually only allow internet traffic on http and https (ssl) through a forward proxy.Then you have two ways to go.1. Tunnel ssh over http; Then you must cope with all strange hacks a forward proxy might do. Adding headers etc.2. Or do some tricks over https proxy connect with ssl, one could be my solution above.

  2. February 25th, 2012 at 04:41
    Reply | Quote | #3

    thanks for share!