Hi,

I've got a remote system connected to the internet that I'm trying to
connect to. The remote system runs a web server, on port 80.

The remote system is behind NAT, so connections cannot be directly
made to it, and the NAT system cannot be configured (it's connected
via a GPRS card, and the service provider cannot allow port
forwarding.

But I can make connections out from the remote system.

So what I have devised is a couple of applications:

One sits on a server machine on the internet which I can make
connections to. This application listens for connections from my web
browser, and connections from the remote application.

The other (the remote application) sits on the remote system, and
establishes a socket connection to the web server, and a connection to
the server application.

Each of these programs transfers data transparently between it's two
connections, effectively creating a "tunnel" between the web browser
and the web server.

I've tested the application with telnet (to a telnet server), and it
works correctly.

However, when I connect to a web server through it, I get corrupted
web pages. I've checked the data being sent through the system, and it
appears that the web browser is getting confused with the responses
from the web server, causing images in the wrong place, and images not
to appear.

From my analysis, I can only surmise that the web browser is being
confused because the TCP connection essentially ends at the server
application, not the (remote) web server. This means that the TCP
requests are being responded to by the server application, and
unsolicited data is arriving moments later. The web browser sees the
unsolicited data as responses to more recent requests which have not
yet been acknowledged by the server application.

Basically, my questions are:
* Is this analysis correct?

* What do I need to do to allow my web browser to connect to this web
server?

Cheers,
Alex.

Re: HELP: Transparent HTTP proxy through NAT by phn

phn
Wed Aug 18 11:27:13 CDT 2004

In comp.protocols.tcp-ip Alex <lisalexernie@bertiinet.net.au> wrote:
> Hi,

> I've got a remote system connected to the internet that I'm trying to
> connect to. The remote system runs a web server, on port 80.

> The remote system is behind NAT, so connections cannot be directly
> made to it, and the NAT system cannot be configured (it's connected
> via a GPRS card, and the service provider cannot allow port
> forwarding.

> But I can make connections out from the remote system.

> So what I have devised is a couple of applications:

> One sits on a server machine on the internet which I can make
> connections to. This application listens for connections from my web
> browser, and connections from the remote application.

> The other (the remote application) sits on the remote system, and
> establishes a socket connection to the web server, and a connection to
> the server application.

> Each of these programs transfers data transparently between it's two
> connections, effectively creating a "tunnel" between the web browser
> and the web server.

> I've tested the application with telnet (to a telnet server), and it
> works correctly.

> However, when I connect to a web server through it, I get corrupted
> web pages. I've checked the data being sent through the system, and it
> appears that the web browser is getting confused with the responses
> from the web server, causing images in the wrong place, and images not
> to appear.

> From my analysis, I can only surmise that the web browser is being
> confused because the TCP connection essentially ends at the server
> application, not the (remote) web server. This means that the TCP
> requests are being responded to by the server application, and
> unsolicited data is arriving moments later. The web browser sees the
> unsolicited data as responses to more recent requests which have not
> yet been acknowledged by the server application.

> Basically, my questions are:
> * Is this analysis correct?

Yes. It will however give maintanance problems forever.

> * What do I need to do to allow my web browser to connect to this web
> server?


Change phone-provider to someone willing to provide bi-directional ip traffic. The
above "service" is half-broken. A provider unwilling to provide you with
a reasonable service is no good provider.

> Cheers,
> Alex.

--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.