
running script at tcp connection request
i'm behind a firewall at work and have been trying to get my linux box
to be able to use the provided proxies to the fullest extent possible,
without introducing a security risk. we have three proxies - telnet,
ftp and http. Turns out our http proxy allows the CONNECT command, so
i found and have gotten working a simple script that creates a
connection to a remote server/port through the http-proxy, listens on
a local port, and then when a connection is received locally, does
packet forwarding.
this is great because it means i can make connections to arbitrary
server/ports without opening myself up for incoming connections.
however, it means that each time i want to connect to a new
server/port i have to first run this script, and then instead of
connecting (say, ssh) to the server/port, i have to ssh to localhost
with the new port i just set up.
it works, but it's a bit of a pain. what i'd like to do is somehow
insert this script into the ip layer so that when outgoing connections
are requested, instead of making the connection to the remote
host/port, this code is executed to create the connection across the
http proxy and hand it off to whatever program wanted the new
connection.
i'm having a really hard time figuring out how to do this. can anyone
give me some suggestions? i'd rather not have to modify the kernel,
if at all possible...thanks in advance!
i'm running slackware 7.1, linux 2.2.16
-steve diverdi
-sdive...@hmc.edu