How To Use SSH Tunnelling To Allow Services To Pass Through A Firewall

[this post has been partially damaged during a server failure on 11 July 2004; with the exception of the images, it was recovered on 13 October 2018]

Paul has been stuck with a problem of late – he’s now living in university accomodation, and he’s found that he can’t connect through the university firewall to his external mail server. I advised him that it’s possible to set up an ‘SSH Tunnel’ (through central.aber.ac.uk) to fix this problem, but he hasn’t met with much success (see his blog entry for more details). In any case, here’s my investigation (and solution) to the problem.

How To Use SSH Tunnelling To Allow Services To Pass Through A Firewall
In my example, I’m going to try the opposite to what Paul is trying to achieve. I’m going to try to allow my POP3 e-mail client to get access to the university e-mail server (pophost.aber.ac.uk). As things stand, this server is on the other side of the university firewall, and is inaccessible from outside. The server central.aber.ac.uk, however, is accessible from both sides of the firewall. So what I’ve got is this (yes, I know that this is a gross oversimplification):

As you can see, connecting from my home PC is futile:

C:\Documents and Settings\Dan>telnet pophost.aber.ac.uk 110
Connecting To pophost.aber.ac.uk...Could not open connection to the host, on por
t 110: Connect failed

But if I SSH-in to central.aber.ac.uk…

central:~ $ telnet pophost.aber.ac.uk 110
Trying 144.124.16.40...
Connected to pophost.aber.ac.uk.
Escape character is '^]'.
+OK mailsplit Oct 2000 ready

So, what I need to do is to tell my SSH client to connect to central.aber.ac.uk, and forward specific traffic through the firewall to the mail server. Here’s what I needed to know:

(a) A free TCP port number on my own computer from which I can virtually ‘pipe’ the connection. Most numbers over 1024 are fine. I chose ‘9110’.
(b) The name of the mail server – ‘pophost.aber.ac.uk’.
(c) The TCP port to which I wanted to connect – the standard port for a POP3 mail server is ‘110’.
(d) My user name on a server which: (1) I can connect to; (2) can connect to the server specified in (b). It happens to be ‘dlh9’.
(e) The name of the server specified in (d) (i.e. ‘central.aber.ac.uk’).
(f) My password on the server. Like I’m going to tell you that.

The syntax is:

ssh -L (a):(b):(c) (d)@(e)

I’m using the non-commercial version of SSH Secure Shell Client, so here’s what happens:

C:\Documents and Settings\Dan>"\Program Files\SSH Secure Shell\ssh2.exe" -L 9110
:pophost.aber.ac.uk:110 dlh9@central.aber.ac.uk
dlh9's password:
Authentication successful.

At this point, I’m ready to go. Look what happens when I connect to port 9110 on my own computer, now…

C:\Documents and Settings\Dan>telnet localhost 9110
+OK mailsplit Oct 2000 ready

I could simply point my e-mail program at the ‘mail server’ at localhost:9110, and I’d be able to collect my university e-mail (so long as my SSH connection remained open).

Hopefully this guide will help some folks out there who are struggling with this kind of thing, and in particular, help Paul.

My Very First Operating System

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[more of this post was recovered on 13 October 2018]

I’ve just written my very first Operating System! And I’m putting it here, online, so that you can give it a go if you like. And no, you don’t need to install it – just put it on a floppy disk and try it from there (no, you can’t boot it from a CD yet)!

Don’t expect too much. There’s no user interface (not even a command line). All it is is a bootloader and a kernel that ‘displays pretty squares’ (I stole the ‘pretty squares’ code from somebody else – my Assesmbly needs some work!).

Hardware Requirements
386SX/25MHz or faster processessor
520K or better memory
Floppy disk drive

Instructions For Use
1. Download the floppy disk image file [34K]
2. Download and install WinImage 6.1 (this program lets you write floppy disk image files to floppy disks).
3. Open the image file in WinImage, insert a floppy disk, and select “Format And Write Floppy Disk” from the “Disk” menu. The Operating System will be written to the floppy disk.
4. To run it, you need to reboot your computer with the floppy disk in the drive. If this doesn’t …

 

EU To Use Quantum Crypto-Key Passing To Beat ECHELON

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[further parts of this post were recovered on 13 October 2018]

Now here’s an interesting article [security.itworld.com]. It seems that the European Union is investing €11 million over four years into developing a secure communication system based on quantum cryptography.

For those of you not in the know, quantum cryptography (for passing crypto keys) works like this:

Quantum Cryptography For Dummies

  1. Alice wants to send Bob secret message, confessing her undying love, but doesn’t want anybody else to know how she feels.
  2. She fires some photons out of a special tube, so that some of them spin in different directions.
  3. Numbers are assigned to the different directions of spin, and she multiplies these together – along with a few prime numbers, for good measure – to get a Really Big Number.
  4. Then, Alice does some clever sums on the letters in her love letter, using the Really Big Number.
  5. Alice posts the first line of the new love letter to Bob (the line that says “Dear Bob,”). This is known as the ‘message header’. If Bob sends a message back saying that he got this, Alice will send the rest of…

 

Re-Arranging The Flat

Yes, the the rumours you’ve heard are true – The Flat has been rearranged. In a mighty effort (and with the help of Claire, Paul and Bryn), we’ve pretty much ‘mirrored’ the room widthways. This change provides several benefits:

  • Space saved has been reinvested in floor space and room for two sets of shelves.
  • Computer equipment is no longer stored beside the sink.
  • Instead of not being able to reach any of the shelves in the flat, Claire can now not reach merely some of them. =o)
  • Computer monitors are now not affected by the magnetic fields of the stereo speakers.
  • Webcam has a better view of the room, and possibility has been opened for a second webcam to be added (Troma Night veterans beware!).
  • Less stacking of boxes.
  • More space for seating at Troma Night.
  • More space for games on…

[damaged post partially recovered on multiple occasions]

Long Deadline

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[on 13 October 2018, I was able to confirm that only the image is now missing]

[chez geek card]

The problem with long deadlines is they creep up ever so quickly.

This weekend, I’ll be learning JBoss, Ant, and JUnit, and then writing an an online bank program. Eep.

 

Dissertation Hand-In

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

I handed in my dissertation yesterday. What a farce. Here’s the approximate order of things.

08:30 – Get up. Compile a postscript (.ps) copy of my dissertation, and upload both this and the .tex source files to central.aber.ac.uk. Start walking up to campus (Bryn offers to give me a lift, but I feel energetic, so I bound on up the hill).

09:00 – Reach campus and pay for £5 of printer credit (100 pages). Find a workstation room, log into central, and lpr -Puserarea diss-final.ps (print) it. Marvellous. Pick up the printout.

09:15 – Drop my (printed) dissertation off at the Library to be hardback bound. Everything’s going splendidly. Trek back down town. The hand-in window is 14:00-16:00, so I’ve got loads of time.

13:30 – Arrive back on campus, this time with two CDs (containing the source code and sample data for the project). I buy sticky things from the Union with which to attach them to the inside cover of my dissertation, and then trek to the Library to pick up the masterpiece.

13:45 – Hmm. The binding office seems to be closed. Guess they’re on lunch. I go to return a library book from the Physical Sciences Library, …

Update, 11 January 2020: As the tail-end of this post appears to be lost forever, I’ll fill in the essence of it from memory: after a leisurely morning/early afternoon of getting my dissertation printed and bound for delivery, well-ahead of the deadline later in the day and thus avoiding the mad rush for the printers and binders later in the day, I arrived at the hand-in point only to be told I was supposed to be handing over two copies, not one, and so I ended up caught up in the mad rush I’d been smugly avoiding after all.

Wargames As Public Acceptance

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[more of this post was recovered on Friday 24 November 2017]

There’s a lot of defence for wargames, as Command & Conquer: Generals to see how far this can be taken. In Generals (set in the near future), the United States unite with a (reluctant) China in order to suppress terrorism in (you guessed it) the Middle East. All sides have weapons of mass destruction, but the wording is clear: while the American WMDs are called “Superweapons” the Chinese have “Nuclear Weapons” and the arab states have “Biochemical Terror Weapons”. And that’s not all – the American soldiers all say things like “Doing the right thing,” and “Defending our people,” in true American Hero voices. Meanwhile, the other sides are made to sound insidious and crafty. The Armerican tanks have names like “Crusader” (yeh; let’s make a reference to Jerusalem, shall we?) and “Patriot”, while the global …

 

Dissertation Proofreaders Needed

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

I’m looking for help proofreading my dissertation. If you’ve been invited to, or you’d like to help, please go to https://danq.me/diss/, download the latest version, and post any comments here.

You will need a password. To ensure that only invited parties can get hold of the password, you’ll need to prove your identity. The following groups are permitted to log in:

  • Members of Troma Night: go to the Troma Night web site and log in: the password will appear on the front page, underneath the words ‘Upcoming Events’.
  • People listed as LiveJournal friends of Fiona: go to this LiveJournal post by Fiona (you’ll need to be logged in and on her Friends list).
  • People who can guess the password – it’s the second half of the name of the project of my dissertation, in lower case, with the final letter replaced with the first vowel in the word that is the name of the logo of the organisation that benfits from my project.
  • Other …

Oh! You’re Going To Malawi? While You’re There, Pick Me Up Some AA Batteries…

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

As most of my readers will probably be aware, I’ll later this year be cycling around Malawi as a sponsored stunt with Cycle Tracks: “A Truly Charitable Bike Ride through a Truly Beautiful Country”. In any case; I’d never have thought that our group (11 of us) would be roped into so many other things while we were there.

Our team leader, Alistair, writes:

Eleven is also a fine number for a football team. So maybe at Phoka we could engage the local team in a game. Their handicap is that they are all under 12 and don’t wear boots. But that doesn’t necessarily mean that it will be a walkover as we shall all be totally exhausted from cycling to Phoka and unable to walk never mind kick a ball.

You may be interested to know that we have been offered football strips, boots, footballs, gloves and goodness knows what else for the kids at Phoka. I haven’t figured out how I will get them out to Phoka. They are in 3 kit bags but I don’t know how heavy they might be. Might split it amongst the group for the flights.

Suddenly we’re delivery cyclists, too…

But that’s not all; we’ve got another mission while we’re there: a …

More Celebrations

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[chez geek card]

Yay. Now I’m in a fab bouncey mood and ready to crack on with the next 10,000 words of my dissertation.

People have kindly been offering to proof-read it for me on Sunday night – this is most welcome: if anybody else wants to, you can too: just drop me a comment or a message or something, and I’ll e-mail you it. I presume you’ll all prefer Acrobat .PDFs than PostScript .PS files, yeh?

On which note; everybody’s being really considerate of my need to get this thing done – leaving me to do it where they’re likely to be a distraction; not suggesting really cool things we could be doing right now (except for the above card, ahem), etc. Thank you all, guys!

In other news…

Lots Of Work To Do; Lots Of Dissertation To Do

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[chez geek cards]

I have heaps of work to do today. Then I’ve got to go home and get heaps of dissertation done.

There’s good news, however: our favourite among the folks who’ve been viewing the cafe under our flat has put a bid in. If everything goes well, he’ll buy it and we’ll still be able…

Chez Geek Card Of The Day

[chez geek card removed]

I’m about a quarter of the way through my dissertation. I have to have it finished, printed and bound by Monday morning.

[chez geek card removed]

Shower With Bryn

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[missing image: Chez Geek Card]

BTW: does Bryn know about his page on AberWiki?

 

Last Night’s Dream

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[further fragments of this post were recovered on 13 October 2018]

Last night’s dream was somewhat weird. Like so many of mine:

I’m travelling by train with Claire. We’re going to meet a guy who’s going to give us (plus some other folks we know) a desirable-sounding job. Upon getting there, we find that the other people starting work for him include Alec, Bryn, Liz, and some other folks. Our boss is a tech-geek-guru in a wheelchair. His computer is powered by the kinetic energy of people moving around the room, which is cool and environmentally friendly, I guess, but what happens if everybody stands still? Does he have UPS?

Anyway, we begin our on-the-job training. This involves rowing a one-man dinghy across the office (one side of which is half-filled with water – why it doesn’t flood into the other half I don’t know) to answer one of about twenty phones which are arranged in a crescent shape on a curved shelf at the other side. These phones are old, Bakelite, traditional phones (a …