TCP Control 
Author Message
 TCP Control

I want to have port 1433 on the users machine to connect to 1433 on my
servers ip. This appears to connect with any available port namely from what
others tell me port 80. What can I do to accomplish this?

porttest.Connect("myserver", "1433")
                porttest.GetStream()
                porttest.Close()
                t1.Sleep(150)



Fri, 04 Nov 2005 19:02:40 GMT  
 TCP Control
Hi Scorpion,
Why do you wish to control the source port in this manner? It will not offer
any advantages as far as I can see. This behaviour is quite well defined and
standarized.

The client computer's TCP stack on being asked to connect to a remote port
(say 1433) will choose a free port available locally. This is done
explicitly to avoid port clashes on the client in case multiple applications
/ instances are running.

Do let me know why you have this requirement. Based on that I may be able to
suggest something better.

Regards,

Arvind.

--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This posting is provided "AS IS" with no warranties, and confers no rights.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-


Quote:
> I want to have port 1433 on the users machine to connect to 1433 on my
> servers ip. This appears to connect with any available port namely from
what
> others tell me port 80. What can I do to accomplish this?

> porttest.Connect("myserver", "1433")
>                 porttest.GetStream()
>                 porttest.Close()
>                 t1.Sleep(150)



Sat, 05 Nov 2005 16:01:39 GMT  
 TCP Control
Hi Arvind,

You are perhaps correct. What is happening here is that firewalls are my
number one call issue from customers that prevents them from connecting to
our server. What I have is that code looping at the intro form and if it
detects that it can't reach my server a label is displayed telling them
"they are not connected". But even on computers whose firewalls are not
configured to allow 1433 traffic this icon does not display even if they are
connected to the internet.
What I am trying to do I guess is detect when 1433 traffic is blocked for
one reason or another.

Quote:
> Hi Scorpion,
> Why do you wish to control the source port in this manner? It will not
offer
> any advantages as far as I can see. This behaviour is quite well defined
and
> standarized.

> The client computer's TCP stack on being asked to connect to a remote port
> (say 1433) will choose a free port available locally. This is done
> explicitly to avoid port clashes on the client in case multiple
applications
> / instances are running.

> Do let me know why you have this requirement. Based on that I may be able
to
> suggest something better.

> Regards,

> Arvind.

> --

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Quote:
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> This posting is provided "AS IS" with no warranties, and confers no
rights.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

- Show quoted text -

Quote:
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



> > I want to have port 1433 on the users machine to connect to 1433 on my
> > servers ip. This appears to connect with any available port namely from
> what
> > others tell me port 80. What can I do to accomplish this?

> > porttest.Connect("myserver", "1433")
> >                 porttest.GetStream()
> >                 porttest.Close()
> >                 t1.Sleep(150)



Sat, 05 Nov 2005 18:25:29 GMT  
 TCP Control
Dear Scorpion,
Note that most firewalls will filter based on __destination__ port and not
source port. They have no reason to do that.

As I understand it now, your main requirement is to detect if you're able to
connect to a server from a client, and the destination port is 1433 (on ur
server.) I have several comments on this:

1. As a winsock programmer, I would say that your initial connect() call
from the client would itself fail in this case. Check the return values to
see if the Connect() has failed.
2. 1433 is SQL Server's port. Are you exposing your SQL Server directly to
the Internet? I would say that is a very bad idea, especially if you're not
patched correctly.

Regards,

Arvind.

--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This posting is provided "AS IS" with no warranties, and confers no rights.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-


Quote:
> Hi Arvind,

> You are perhaps correct. What is happening here is that firewalls are my
> number one call issue from customers that prevents them from connecting to
> our server. What I have is that code looping at the intro form and if it
> detects that it can't reach my server a label is displayed telling them
> "they are not connected". But even on computers whose firewalls are not
> configured to allow 1433 traffic this icon does not display even if they
are
> connected to the internet.
> What I am trying to do I guess is detect when 1433 traffic is blocked for
> one reason or another.


> > Hi Scorpion,
> > Why do you wish to control the source port in this manner? It will not
> offer
> > any advantages as far as I can see. This behaviour is quite well defined
> and
> > standarized.

> > The client computer's TCP stack on being asked to connect to a remote
port
> > (say 1433) will choose a free port available locally. This is done
> > explicitly to avoid port clashes on the client in case multiple
> applications
> > / instances are running.

> > Do let me know why you have this requirement. Based on that I may be
able
> to
> > suggest something better.

> > Regards,

> > Arvind.

> > --

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Quote:
> > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

- Show quoted text -

Quote:
> > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



> > > I want to have port 1433 on the users machine to connect to 1433 on my
> > > servers ip. This appears to connect with any available port namely
from
> > what
> > > others tell me port 80. What can I do to accomplish this?

> > > porttest.Connect("myserver", "1433")
> > >                 porttest.GetStream()
> > >                 porttest.Close()
> > >                 t1.Sleep(150)



Sat, 05 Nov 2005 19:52:52 GMT  
 TCP Control
Well I am no where near as experienced as you on this so I will tell you
what happens in the best way I can........

If the user attempts to run this program without being connected to the
internet, the "alarm" icon is displayed like I wanted it to.

That is all well and good but if the user is connected but the firewall is
not configured properly to allow 1433 traffic the "alarm" label does not
appear. How would I make it do so?

On the SQL connection I realize this is poor practice to do this. However,
this framework was in place prior to my arrival and I kind of have to work
within it .....for now.

Thank you for your help........


Quote:
> Dear Scorpion,
> Note that most firewalls will filter based on __destination__ port and not
> source port. They have no reason to do that.

> As I understand it now, your main requirement is to detect if you're able
to
> connect to a server from a client, and the destination port is 1433 (on ur
> server.) I have several comments on this:

> 1. As a winsock programmer, I would say that your initial connect() call
> from the client would itself fail in this case. Check the return values to
> see if the Connect() has failed.
> 2. 1433 is SQL Server's port. Are you exposing your SQL Server directly to
> the Internet? I would say that is a very bad idea, especially if you're
not
> patched correctly.

> Regards,

> Arvind.

> --

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Quote:
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> This posting is provided "AS IS" with no warranties, and confers no
rights.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

- Show quoted text -

Quote:
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



> > Hi Arvind,

> > You are perhaps correct. What is happening here is that firewalls are my
> > number one call issue from customers that prevents them from connecting
to
> > our server. What I have is that code looping at the intro form and if it
> > detects that it can't reach my server a label is displayed telling them
> > "they are not connected". But even on computers whose firewalls are not
> > configured to allow 1433 traffic this icon does not display even if they
> are
> > connected to the internet.
> > What I am trying to do I guess is detect when 1433 traffic is blocked
for
> > one reason or another.

message

> > > Hi Scorpion,
> > > Why do you wish to control the source port in this manner? It will not
> > offer
> > > any advantages as far as I can see. This behaviour is quite well
defined
> > and
> > > standarized.

> > > The client computer's TCP stack on being asked to connect to a remote
> port
> > > (say 1433) will choose a free port available locally. This is done
> > > explicitly to avoid port clashes on the client in case multiple
> > applications
> > > / instances are running.

> > > Do let me know why you have this requirement. Based on that I may be
> able
> > to
> > > suggest something better.

> > > Regards,

> > > Arvind.

> > > --

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Quote:
> > > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

- Show quoted text -

Quote:
> > > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



> > > > I want to have port 1433 on the users machine to connect to 1433 on
my
> > > > servers ip. This appears to connect with any available port namely
> from
> > > what
> > > > others tell me port 80. What can I do to accomplish this?

> > > > porttest.Connect("myserver", "1433")
> > > >                 porttest.GetStream()
> > > >                 porttest.Close()
> > > >                 t1.Sleep(150)



Sat, 05 Nov 2005 23:00:01 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Winsock TCP control and Type Mismatch

2. Winsock TCP Control available at http://fox.nstn.ca/~tonyr

3. ActiveX Winsock TCP control (un)loading

4. ActiveX TCP Control question

5. ActiveX TCP control question

6. ActiveX TCP control question

7. Need Help with vb5 tcp control...sending files/recieving files

8. Sending graphics to a browser with TCP control (ICP Beta2)

9. ICP TCP control-Can I send user defined datatypes/arrays

10. Trouble registering TCP control. Please help.

11. Power TCP control array issue.....Connection is being Disconnected !!!

12. Is there any tcp control that works under VB5CCE?

 

 
Powered by phpBB® Forum Software