Re: How to check port conection? socket_connect and fsockopen have problems

From: Date: Mon, 10 May 2004 17:44:15 +0000
Subject: Re: How to check port conection? socket_connect and fsockopen have problems
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-23661@lists.php.net to get a copy of this message
BAT, I have tried fsockopen and socket_connect on two machines. First comp has Kerio firewall, and second hasn't any firewall. Problem persists on each machine. And I can't look at remote socket... Comp on other end just doesn't exist... :) After timeout (when using fsockopen) SYNC_SENT connection closes normally, but LISTENING connection remains. Best regards, Sherry. "B.A.T. Svensson" <B.A.T.Svensson@lumc.nl> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:D291F33C586C8E48B95C26F8C805513A01A3DA91@mail5.lumc.nl... > Ok, I see the nature of the problem now. > > You probably get all these SYNC_SENT and TIME_WAIT because > the hand shake is not properly done between the machines. > > SYNC_SENT means that the local socket is trying to > established a connection. > > TIME_WAIT indicates that no shutdown is (yet) recived > from the other end. > > (This how is the classical SYNC-attack works, i.e. > open a port on the remote machine, and drop the > connection without picking up the SYNC_SENT pakages, > leaving the remote server port in TIME_WAIT - this way > one can "eat up" all ports on a remote machine.) > > In these cases it very useful to have a look at the socket > state at the remote peer to determine weather the sync > package was received or not. > > > Firewalls can sometimes screw up this kind of traffic, > and drop SYNC packages in both direction without no good > reason - the firewall log may complain that the package > "looks like" it was forged, but in fact it is just fine.

« previous php.windows (#23661) next »