On Fri, Dec 08, 2000 at 08:24:53AM -0600, Ken Hardy wrote:
> Do you know where I can find how to program to this feature of
> Linux? 

It is easy. You have two modes: 

- eighter you write a "normal" program which
is binding on a local socket (can even be by inetd) and then use ipchains to
redirect complete networks to your local application 

ipchains -p tcp -D 0/0 80 -j REDIRECT 81

(this will redirect all traffic to ports 80 of any host to the local
application running on port 81.)

- or you use a program which is specifically binding to a foreign address
(this requires root and is only possible if transparent redirects are
enabled).

You may wynt to have a look at transproxy

BTW: if you want to get the remote address of the "catched/absorbed"
connection you will need to use a simple getsockname(2)

Greetings
Bernd
-- 
  (OO)      -- [EMAIL PROTECTED] --
 ( .. )  ecki@{inka.de,linux.de,debian.org} http://home.pages.de/~eckes/
  o--o     *plush*  2048/93600EFD  eckes@irc  +497257930613  BE5-RIPE
(O____O)  When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!
-
[To unsubscribe, send mail to [EMAIL PROTECTED] with
"unsubscribe firewalls" in the body of the message.]

Reply via email to