July 29th, 2007
Portforw
One of the things I coded in Perl a while ago that I was planning to port to Ruby at some point was a little port forwarding utility called portforw (GPL license). I provided a link to download it here because perhaps you may find it useful, too, if you also need such a utility. I consider it moderately well written—I can be somewhat proud of it and somewhat embarrassed by it at the same time. I was going to clean it up when I made the Ruby port (which at one point I wrote quite a bit of code for, but now it languishes).
Portforw does what it sounds like: it forwards connections from one place to another. But simply forwarding connections is not the limit of portforw’s abilities; if connection forwarding was all I needed I would have used the port redirect feature with some host-based firewall software. Portforw also filters the data as it passes through, allowing it to pass connections through different kinds of proxies.