Tuesday, 27 January 2015

Port forwarding

While I was out, I was thinking. When I'm caching, there's several minutes between caches when all I'm doing is biking along, so there's plenty of spare brain to do some serious thinking with. And no possibility of interruption, which I fond very inconducive to deep thoughts.

Here's what I thought. Port forwarding. With a pix, you can tell it "if someone tries to access on port 81, redirect that to on port 80". So if I access with my browser (but telling it to use port 81) I'll actually be browsing That becomes very useful in the following scenario.

I have four remote rebooters; using those, I can reboot the attached computers from anywhere in the world. I've been thinking that I'll need four ip addresses for them, but if I use port forwarding, I only need one. The fact that they are accessed using weird ports, doesn't matter because Im the only person who will be using them!

And then I thought some more. I could put my mail server on the same IP address, and port-redirect it to the actual mail server. Likewise various other things. It all adds up to an economy in the use of IP addresses. Why is this good?

Because ip addresses are  in the form a.b.c.d, where abcd are each a number in the range 0 to 255. So there's only 4 billion possible IP addresses, and that might sound like a lot (and when they devised this scheme a couple of decades ago it was a lot) but it isn't. And the world has run out of IP addresses.

And, like any scarce resource, they'll get increasingly expensive. They say that god only made so much land and that's all there is (except if you're Dutch). Well, god only made 4 billion IP addresses, and you can't make more even if you are Dutch.

What's happening now, is that people are paying for IP addresses - my current colocation charges me £2 per month per IP. So you can see there's a real incentive to economise on the number that you're using.

And port forwarding can help do that.


  1. When you've finished having all this fun with Pixes, you can take a look at IPv6, the kind of thing you need when 4 billion addresses just isn't enough.

  2. Yes, I know about ipv6, but the problem with it is, I don't think that all of my customers are using it, and as long as there are some that are only using ipv4, I have to offer that.