Traffic forwarder
Results 1 to 7 of 7

Thread: Traffic forwarder

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Posts
    339

    Traffic forwarder

    Hello, I need a help. I'm going to make a program for my own research.

    Its main purpose is to forward any TCP/IP traffic originated from a local machine to any remote address at a given port, to another port on the same local machine. It should run only on this very machine, not require other programs/components on other machine. The remote address should be any address (not specific), and the original/forwarded port should be configurable. And it should work on Windows (under Cygwin is fine).

    For example:
    On my box, I'm trying to telnet using Win telnet client to any other box. Then this program wakes up, and forwards all my telnet traffic to a fake, working telnet daemon listening at a port other than 23 in my own box. Now, the telnet connection is established between the telnet client and the fake telnet daemon, both are running on my box.

    Any hints/pointers are appreciated. Thanks in advance.

    Peace always,
    <jdenny>
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
    I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds


  2. #2
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    You need everything to do a loopback. Take a firewall program that check outgoing traffic and modifited it to do a loopback on everything. Should be easy. Good Luck.
    -Simon \"SDK\"

  3. #3
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    I came in to the world with nothing. I still have most of it.

  4. #4
    Senior Member
    Join Date
    Jul 2002
    Posts
    339
    Thanks for the replies guys...

    SDK, I was thinking about firewall too. In fact it's a job for a firewall. I'll make my own firewall program then. But I'm not sure if I can configure a ready-to-use firewall on Windows to intercept outgoing traffic to remote_host:remote_port, and forward it to local_host:local_port. Do you have some info on this?

    rcgreen, I'm a longtime netcat user. But I thought at one time netcat can only intercept traffic to a specific remote address, while I need it to intercept traffic to any remote address. Pls CMIIW.

    Here's another sample configuration:
    Outgoing FTP traffic to any remote address (0.0.0.0) should be forwarded to localhost:10021
    Outgoing HTTP traffic to any remote address should be forwarded to localhost:10080
    etc...

    Peace always,
    <jdenny>
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
    I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds


  5. #5
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    Sorry, I'm not a programmer at all. I don't know if you can do this on Windows or Linux. Getting the source code for a firewall that work for Windows might be painfull.
    -Simon \"SDK\"

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Posts
    339
    That's ok SDK. I'm considering myself as a casual programmer. That's why I asked here about it.

    But I still appreciate any comments. Anyone? Seniors? Is it even possible to do? Or do I have to wake up from my daytime dream? Well I thought I can use it for my custom kid protection...

    Peace always,
    <jdenny>
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
    I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds


  7. #7
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    It's possible.. The hardest part will be to intercept the data.. Firewall do that job so if you look up for information about programming a firewall and just take the part about intercepting data, it'll a very good start.
    -Simon \"SDK\"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •