HOWTO: Reading UCSC newsgroups from an external ISP using SSH port forwarding.
BY: Max Baker (email@example.com)
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.
- A SSH client
PuTTY! is the best
free ssh client out there.
this is basically a nice replacement of telnet that has color and
downloads and compression and ssh capabilities.
- Linux, Mac OS X, Solaris, Cygwin:
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
- A newsgroup reader
- Mozilla or
Windows, Linux, OS X, MacOS, AIX, Solaris, BEOS, BSD, HPUX, VMS, OS/2...
Best Web Browser and Mail / News reader around.
- Outlook Express. Micro$oft is evil, but this works also.
- Power tools and lots -- this is a macho job.
- A cats account.
Creating the Tunnel:
- Change dir to ~/.ssh and add or modify a file called config
and add this line CompressionLevel 9 and this line Compression
- If you have a firewall, close off localport 1119 from connections other
than localhost (127.0.0.1).
- Make sure you end the SSH connection when you're done to close the tunnel.
- Use mozilla or whatever you want in X, just make sure to add a newsgroup server as
localhost (127.0.0.1) port 1119
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.
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.
Secure CRT Setup
- Install Secure CRT
- When you start it, hit [Cancel] at the quick connect window that pops up
- _File _Connect
- Right click (Sessions) and choose (New Session)
- Name It
- Choose ssh1 from the protocol list
- Enter unix.ic.ucsc.edu for the hostname
- Enter your short CATS username in the username slot (ie 'maxb')
- Click [Advanced]
- Choose (Use Compression) and bump it up to 9 (great for newsgroups!)
- Go to the [Port Forwarding] tab
Local Port: 1119
Remote Hostname: news.ucsc.edu
Remote Port: 119
- Click [Save], Click [OK] to save the port forwarding
- Optionally change some other sessions settings, such as the color scheme (I like white on black myself)
- Click [OK] to save the new profile.
- [Connect] and make sure it's happy.
- _Options _Save_Settings_Now
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.
- _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
- 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
Now that you have the account setup you can use subscribe
to your class newsgroup. Make sure your SSH connection is active first.
- Outlook Express 4:
- _Tools _Accounts
- [Add] -> News...
- Your Name
- Your e-mail
- News (NNTP Server): localhost
- Change localhost Properties
- Click the Advanced tab
- Server Port Number - News: 1119
It should start loading up a list of available newsgroups.
- Click localhost in the left pane
- Click NEWSGROUPS in the right pane
- in "display newsgroups which contain" type ucsc.class.cmps101
(Change cmps101 to the class you are taking)
- Click [_Subscribe]
- Click [OK]
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 ]