• Photos Photos
  • Linked In Linked In
  • Google + Google +
  • Facebook Facebook
  • Flickr Flickr
  • Vimeo Vimeo

www.gavinwill.me.uk

Photography, IT, Bikes and more.

  • Pages

    • About
    • Blog
    • Contact
    • Home
  • Archives

    • January 2013
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
  • Search:

Posts

  • View Archive

Monthly: June 2012

Raspberry Pi and XBMC

My Raspberry Pi has finally arrived. There is no denying it is an impressive bit of kit for the cost. Whilst I don’t have a need to use it as a media player I did try XBMC quickly and it is really impressive to run youtube videos at 1080p resolution from such a small computer costing £25. I am looking forward to seeing what people use the Pi for. Personally I am looking to use it as a cheap allways on webserver and for some home automation tasks.

  • June 9, 2012
  • 0
  • 0

Raspberry Pi and Reverse Proxy

With finally ordering a Raspberry Pi but not having recieved it yet I am testing the concept of using the Raspberry Pi as a Reverse Proxy to easily allow me access to a few devices I have at home without having to rely on running web services on different ports since I only have the 1 public IP address at home. By simply using a reverse proxy on the Raspberry Pi I can easily access kit at home using different hostnames. A quick test on a virtual machine proved the concept.

After installing apache I needed to enable to proxy module with the command:

a2enmod proxy_http

a2enmod proxy_http

Then simply setup the apache sites with the following info:

<VirtualHost *:80>
 
ServerName device1.mydomain.com
 
    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass / http://internadevice1/
    ProxyPassReverse / http://internaldevice1/
 
</VirtualHost>
 
<VirtualHost *:80>
 
ServerName device2.mydomain.com
 
     ProxyPreserveHost On
     ProxyRequests off
     ProxyPass / http://internaldevice2:8080/
     ProxyPassReverse / http://internaldevice2:8080/
 
</VirtualHost>

<VirtualHost *:80> ServerName device1.mydomain.com ProxyPreserveHost On ProxyRequests off ProxyPass / http://internadevice1/ ProxyPassReverse / http://internaldevice1/ </VirtualHost> <VirtualHost *:80> ServerName device2.mydomain.com ProxyPreserveHost On ProxyRequests off ProxyPass / http://internaldevice2:8080/ ProxyPassReverse / http://internaldevice2:8080/ </VirtualHost>

Adding the DNS entries and testing by browsing to device1.mydomain.com and device2.mydomain.com resulted in the access to the correct internal devices.

Naturally this is just a proof of concept and needs a bit more work to ensure secure but It will mean with the Raspberry Pi I can use it as a way to easily connect to internal devices with simply having 1 port open rather than numerous ports all for different devices. With some of my devices only offering http support I can add a self signed SSL certificate to the Apache Reverse Proxy to stop any sniffing of usernames and passwords if I were just browsing http over the internet.

*Update* I have now recieved the Pi and it is working great as a reverse proxy. Running top whilst using the proxy I can see the processor usage is minimal at around 3% so even although it is a low powered device it is handling this very well.

  • June 3, 2012
  • 0
  • 2

Copyright © 2021 www.gavinwill.me.uk.

  • LinkedIn
  • Google +
  • Facebook
  • Flickr
  • Vimeo
Back to Top