Transparent communication by way of proxy?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Derek (user_at_nospam.org)
Date: 10/13/04


Date: Wed, 13 Oct 2004 16:35:53 -0400

I'm new to network programming and Win32 and I could
use some advice about solving a communication problem.
I currently have a setup that looks like this:

Computer AAA Computer BBB
------------ ------------
   Process A <-- TCP/IP --> Process B

Processes A and B communicate over TCP/IP using a
higher level protocol that's not important to this
discussion (pretend it's FTP or HTTP if you want).

The problem is that computer AAA is on my network and
BBB is at my client's site, and their business folks
insist that I use a specific middle-ware messaging layer
for communication between AAA and BBB. To accomplish
this I would like to write a proxy process that forwards
TCP/IP traffic between Process A and B transparently:

Computer AAA Computer BBB
------------ ------------
   Process A Process B
      | |
    TCP/IP TCP/IP
      | |
    Proxy B <-- Middleware --> Proxy A
                Messaging

My idea is this: if A wants to talk to B, it will talk
to Proxy B instead, which will in turn package the raw
packets as binary message data to send to Proxy A, which
will in turn send the packets for Process B to consume.

I know I haven't provided much detail, but is this proxy
idea possible?

I assume I will have to grab raw packets using winpcap
or a similar library. I also suspect the proxy process
will have to tweak IP packet headers to fool Process A
and B into thinking they are communicating directly,
right?

I am currently prototyping this proxy solution in C/C++
on WinXP, but in production I may be forced to use Win2k
instead.

Thanks for any input.

Derek



Relevant Pages

  • Re: Update: UDP 770 Potential Worm
    ... > the network immediately after the 'attack', ... were no packets indicating some form of replication. ... I noticed that the UDP ... > of the UDP datagrams is the IP address of the proxy? ...
    (Incidents)
  • Re: Update: UDP 770 Potential Worm
    ... > were no packets indicating some form of replication. ... > my capture was limited due to the switched ... to see if the problem occurs on the test network, ... The proxy had already been isolated from the ...
    (Incidents)
  • Re: [fw-wiz] dirty packet tricks?
    ... solve via promiscuously sucking up packets. ... restriction that your 'sideways' proxy box is it will have to be on a hub ... The firewall will have to suppress all ICMP errors to the internal network ...
    (Firewall-Wizards)
  • a problem with nat table setting
    ... linux PC and the webserver before I start the proxy, ... http packet will not be passed to the proxy, ... Chain INPUT (policy ACCEPT 3574 packets, ...
    (comp.os.linux.misc)
  • a problem with nat table setting
    ... linux PC and the webserver before I start the proxy, ... http packet will not be passed to the proxy, ... Chain INPUT (policy ACCEPT 3574 packets, ...
    (comp.os.linux.embedded)