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.
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:
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>
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.