The Technical Details

Just when you thought there was no way my blog posts could get any more boring, I said “Hold my Cass” and am going to do a post about how this tiny pointless blog works!

Bit of background as there are only a finite amount of internet IP addresses available in the world (less than 4.3 billion), one of your home routers main jobs is to issue out local IP addresses (eg. 192.168.0.2) to your devices and then allow them to share one single internet IP address, via a process called Network Address Translation (or NAT). An example of an internet IP address is 50.28.59.200 (which is actually a server of my web hosting company magicgenie.co.uk).

You also generally internet providers in the UK have a dynamic internet IP address allocation, which means you are allocated a different internet IP address usually every 24 hours, rather than a static IP address where you always get the same IP address. If you want to host something on the internet very much like holding an event, you need a fixed address and can’t have it moving around!

If you ever need to know you internet IP address simply stick “what’s my IP” into google.

So each room in the apartment complex has a cat5 outlet which with a bit of digging and to my surprise, not only offered an internet IP address rather than a local one. This is then plugged into a small router that was found next to my TV that is also being used to provide WiFi to the room.

The router in the rooms is an ipTime N104plus-i. ipTime are a Korean networking company and you often see ‘iptime’ open wireless networks all over Korea. However and there is one thing you should take away from this dull article the router was using default login credentials… (admin/admin). So I could get into the settings which allows me to play around with the routings settings…. PLEASE PLEASE PLEASE CHANGE YOUR ROUTERS DEFAULT PASSWORD. It’s the number 1 internet security venerability and easy to fix.

As I had 2 weeks of not a-lot on, I brought a spare Raspberry Pi 3 Model B+ computer with me that I thought I could do multiple things with, media server for the TV or generally just play around to pass them time. But now I also had an exposed router and an internet IP I realised I could quickly setup the Raspberry Pi to be a web server and forward the web browsing traffic hitting that internet IP address to hit the Raspberry pi, via a router option called port forwarding.

Now the internet IP i’m assigned is dynamically assigned although it appears to always assign me the same IP address. This could be due to a long lease time or this routers MAC address may have a reservation attached to it, either way as this is only temporary if the address does change i’ll simply manually change the details for korea.magicgenie.co.uk.

The Pi was already setup with Raspbian which is a version of Linux operating system designed for Raspberry Pis. From then I installed the required server software to the Pi (LAMP), and then WordPress as the software to run the actual blog.

For those wishing to try setting up a web server on a Raspberry Pi themselves i’d recommend following this excellent article.

(NOTE – mySQL won’t install anymore so you’ll need to issue this command to install MariaDB instead – everything else is correct)

sudo apt-get install mariadb-server -y

It’s slightly ironic that I do actually part own a small actual web hosting company, so am not in short supply of web space on an actual web server! but there you go, that’s how I got a small web server running in quarantine with me and outputting this pointless blog to the world!

I’ll need that bottle of Cass back now…