Monthly Archives: December 2015

Internet Service Provider Switch


Google Fiber started their internet service provider a couple years ago in Kansas City and has extended their offer to the neighbor cities. My city was selected. I subscribed to have our neighborhood fiber ready. After a period, our neighborhood was successfully selected.

About two months ago, I got the email that Google was ready to connect the fiber to our home.

It took the technician some time to install the Cat5E cable to our living room, but it was eventually installed and functional.

Google Fiber is amazing, I attached a screenshot below.

fiber

File Server Hardware Update

Following the reuse of most of the parts of the previous file server for the new Plex client PC, I decided to upgrade the parts for the file server. I wanted a processor that would have enough CPU power to handle Plex, and a motherboard with enough connections to handle my need for storage.

The updated server has now the following parts :

Cost: 900 $

My setups consists of one hard drive for the operating system, and 5 for storage purposes.

For the storage, I have one hard drive dedicated to store the backups of all the computers we possess, and four hard drives in RAID1 for the files.

The server is on idle most of the time, and consumes 36W idle.

Client Computer for Plex Server

My family and I have been using Plex since I discovered it, and I was wanting a client connected to our TV. I didn’t want to buy a Roku or AppleTV, as I was worried of the maintenance of such device. I also did not want to live with the limitations of the codecs and processing power of client. For this purpose, I decided to upgrade the parts for the File Server, and reuse parts to build a full mini-PC which would act as a Plex Client.

I installed Plex Media Player on that newly build mini-PC.

The mini-PC has the following parts :

Cost: 80 $

Plex Web Interface Redirection

I have been using Plex for quite some time, and one of thing which was annoying to me was the way to access Plex.

The typical way Plex is accessed is via a local IP address at http://localipaddress:32400/web/. Changing the bit to make Plex available to the outside is a bad idea, as there is no restriction.

I wanted to do a redirection via my domain to have the following: http://plex.mydomain.com

It was not easy to find a solution, and i ended finding that I have to do a reverse proxy, and redirecting the address to the Plex server.

For this, luckily, I already had my Kubuntu virtual machine with Apache.

On top of that, a couple of days later, I stumbled on the very good article of Matt Coneybeare

The right way to do it securely is mentioned at the end of the article.

  1. Setup a DNS entry for plex.domain.com box using the interface of your DNS provider
  2. Setup port forwarding on port 80 to your Plex server’s port 32400.
  3. Add the following code within etc/apache2/httpd.conf:
    <VirtualHost *:80>
        ServerName plex.yoursite.com
    
        <Location />
            AuthType Basic
            AuthName "Restricted area"
            AuthUserFile /private/etc/apache2/htpasswd
            Require valid-user
        </Location>
    
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
    
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / http://127.0.0.1:32400/
        ProxyPassReverse / http://127.0.0.1:32400/
    
        RewriteEngine on
        RewriteCond %{REQUEST_URI} !^/web
        RewriteCond %{HTTP:X-Plex-Device} ^$
        RewriteRule ^/$ /web/$1 [R,L]
    </VirtualHost>
    
  4. If you do not have a htpasswd file created already (you probably don’t), you can create one by running the following commands in the Terminal:
    $ cd /private/etc/apache2
    sudo htpasswd -bc htpasswd [username] [password] 

    Replace the username and password with what you would like

  5. Restart the server by running
    $ sudo apachectl restart

    Now you have a secure redirection for the Plex Web interface.
    This will give you access to the Plex Web interface as if you were on your LAN.