You can't use a web server as a TCP tunnel. You can have a mod_perl app start up a port forwarder (like SSH), but you can't take a connection and hand it to something else without some low-level C hacking on both programs.
You could try using a telnet:// or rlogin:// URL if you just want people to click on a link and have a terminal pop up.