HOWTO: Reading UCSC newsgroups from an external ISP using SSH port forwarding.

BY: Max Baker (max@warped.org)

SHORT:

Well, you want to use news.ucsc.edu so that you can see your classes' newsgroups and be a productive happy student. But the newsgroup server is only available from inside the UCSC network, and you're running DSL, or Cable modem, or are dialing up to an ISP that works. Which means you either have to logon to the modem pool to read your news from a windows program, so that you are part of the UCSC network, or you have to use a telnet or ssh terminal window from your current ISP.

SOLUTION:

Use Secure Shell (SSH) to map a port from a ucsc server to your local computer, and then point your favorite windows based newsreader to that new port on your computer.

NEEDED:

  1. A SSH client
    1. Windows:
      PuTTY! is the best free ssh client out there.
      or
      Secure CRT this is basically a nice replacement of telnet that has color and downloads and compression and ssh capabilities.
    2. Linux, Mac OS X, Solaris, Cygwin:
      Open SSH is a command line SSH server and client.
      If you have Linux, or OS X this is already installed under /usr/bin/ssh. Just open up a Terminal window and follow the instructions below.
  2. A newsgroup reader
    1. Mozilla or Thunderbird.
      Windows, Linux, OS X, MacOS, AIX, Solaris, BEOS, BSD, HPUX, VMS, OS/2...
      Best Web Browser and Mail / News reader around.
    2. Outlook Express. Micro$oft is evil, but this works also.
  3. Power tools and lots -- this is a macho job.
  4. A cats account.

Creating the Tunnel:

Linux:

ssh -C -l maxb -L 1119:news.ucsc.edu:119 unix.ic.ucsc.edu

You might need to use a different cats machine than unix.ic, these instructions date back to 2000.

Macintosh

You should be able to pretty much follow the windows instructions, you just need to go and find a good SSH client for Mac. Ask at the IRC (459-4357) if they have a default one.

OS X - Just pretend you're using Linux and follow the above instructions. Open a Terminal Window.

Windows

Secure CRT Setup
  1. Install Secure CRT
  2. When you start it, hit [Cancel] at the quick connect window that pops up
  3. _File _Connect
  4. Right click (Sessions) and choose (New Session)
  5. Name It
  6. Choose ssh1 from the protocol list
  7. Enter unix.ic.ucsc.edu for the hostname
  8. Enter your short CATS username in the username slot (ie 'maxb')
  9. Click [Advanced]
  10. Choose (Use Compression) and bump it up to 9 (great for newsgroups!)
  11. Go to the [Port Forwarding] tab
    Local Port: 1119
    Remote Hostname: news.ucsc.edu
    Remote Port: 119
  12. Click [Save], Click [OK] to save the port forwarding
  13. Optionally change some other sessions settings, such as the color scheme (I like white on black myself)
  14. Click [OK] to save the new profile.
  15. [Connect] and make sure it's happy.
  16. _Options _Save_Settings_Now

Putty
Something similar to Secure CRT.

OK, now to use this, the SSH connection in Putty/CRT is going to have to be connected whenever you want to SEND or RECEIVE newsgroups from news.ucsc.edu.

When you go to close the ssh window, it may say something about not being able to disconnect a mapped service. This means that your news group client is keeping the connection open, so you need to close out of Mozilla or Outlook or whatever your news client is before you can close the ssh connection, or you should be able to force it.

Again, if Putty/CRT isn't connected, then you wont be able to use the newsgroup server.

Setting Up News Client:

Basically you'll need to setup a new news server with hostname localhost and the server port changed from 119 to 1119.
  1. Mozilla
    _Window, _Mail and Newsgroups
    _Edit - _Mail and Newsgroup Account Settings
    [Add Account]
    [Newsgroup Account], [Next]
    Your Name, Your Email, [Next]
    Newsgroup Server: localhost
    Account Name: UCSC Forwarded to Localhost
    [Finish]
    Look for "UCSC Forwareded to Localhost"
    MAKE SURE that Compose Messages in HTML Format is NOT checked.
    Click on [Server Settings] tab
    Change Port: to 1119
    [OK]

    Now that you have the account setup you can use subscribe to your class newsgroup. Make sure your SSH connection is active first.

  2. Outlook Express 4:
    _Tools _Accounts
    [Add] -> News...
    Your Name
    Your e-mail
    News (NNTP Server): localhost
    [Finish]
    Change localhost Properties
    Click the Advanced tab
    Server Port Number - News: 1119
    [OK]

    It should start loading up a list of available newsgroups.

    1. Click localhost in the left pane
    2. Click NEWSGROUPS in the right pane
    3. in "display newsgroups which contain" type ucsc.class.cmps101
      (Change cmps101 to the class you are taking)
    4. Click [_Subscribe]
    5. Click [OK]

SUPER IMPORTANT!

Make sure you DISCONNECT the SSH Connection immediately after using the newsgroup in this manner. The wonderful new method you made for using the newsgroup is now also available to all the world. That is to say, you are leaving it open to have the whole world have access to the newsgroup server IN YOUR NAME. (Chances are slight, but its a bad risk.)

To avoid this, use a firewall (turn on the one in XP) and make sure that connections not on localhost (127.0.0.1) do not have access to port 1119.

[ Back to warped.org | Linux ]


©2000,2002,2004 Max Baker