Is it possible that a web server initiates a tcp connection to a browsing client?

3

when users use browser to visit a web site, it is of course the client send TCP SYN to initiate a tcp connection with the web server.

I'm wondering are there any cases that a web server initiates a tcp connection to a browsing client?

I think in current Internet, there should be no such cases, right?

misteryes

Posted 2013-05-24T12:41:08.297

Reputation: 2 255

Question was closed 2013-06-04T14:58:03.950

I read a paper, "how hard can it be? designing and implementing a deployable multipath TCP", in the 5-th paragraph of section 3.2, it says: "if only the server is multi-homed, the wide prevalence of NATs makes it unlikely that a new SYN it sends will be received by a client" – misteryes – 2013-05-24T12:59:11.140

1+1 Because this is a perfectly sound question. Voting down this question is really unfair. – artistoex – 2013-05-25T16:08:32.787

@Ramhound Q:How on earth could the server initiate the connection and why would this be something you want? A:exactly the same way, the client initiates a connection to the server – artistoex – 2013-05-25T16:18:09.810

Web browsers support FTP. RFC 959, Section 3.2: The server, upon receiving the transfer request, will initiate the data connection to the [client] port. Left as an exercise to the reader: find a browser whose ftp module supports client side passive data transfer. – artistoex – 2013-05-25T16:21:34.727

if the browser use port 32000 to connect to web server, then web server(port 80) will initiate a data connection to the same port(32000)or other port? – misteryes – 2013-05-26T00:08:39.073

The data connection is specific to the File Tranfer Protocol. See data connection in RFC 959. The Browser specifies the data port using FTP commands. Of course, a connnection innitiated by a server client rarely works, because most users sit behind a NAT.

– artistoex – 2013-05-26T07:55:12.860

Answers

0

Such connection would be rare and limited to specific applications. They would generally fail because users sit behind NATs. As far as I can tell, they are not mentioned in the HTTP spec.

There are two cases which indeed may involve connections initiated by web servers. FTP and server side scripts.

Web browsers support FTP. RFC 959 specifies a data connection which may be initiated by the server, based on the FTP commands issued by the web browser.

It's also conceivable that a script running on a web server initiates a connnection (for whatever purpose) after it has been requested by the client.

artistoex

Posted 2013-05-24T12:41:08.297

Reputation: 3 353