Re: [PATCH] tcpserver: transparent tcp proxying support using Linux netfilter + nc
[email protected] (Paul Jarc) Tue, 05 Aug 2003 12:28:12 -0400
| Newsgroups | gmane.org.djb.miscellaneous |
|---|---|
| Organization | What did you have in mind? A short, blunt, human pyramid? |
| Message-ID | <[email protected]> |
Denis Vlasenko <[email protected]> wrote: > I'm not really sure where to send this. <URL:http://www.superscript.com/lists.html#ucspi> > With this really small patch you can proxy any TCP > service. IIUC, no patch is needed for that. You can already get the same effect by running multiple tcpservers on separate ports. Each one would be configured by hand to proxy to a different address/port, instead of getting that information from the socket. Another option would be to write a wrapper to be invoked by tcpserver that would inspect the socket, set the environment variables, and exec the rest of its command line. > Theory of operation: upon accept, tcpserver queries > Linux kernel about 'original' (ie, before -j REDIRECT) > IP and port numbers and places them into > TCPORIGDSTIP and TCPORIGDSTPORT. To be consistent, s/DST/LOCAL/g. > +#include <linux/netfilter_ipv4.h> It's doubtful Dan would accept such a platform-specific patch. paul