Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I was wondering if someone to could help me and put me out of my misery :P

 

I have written a program to talk across the network, which works quite well, I have read most of the posts about making the program talk across the internet (port forwarding etc) and for the most part, it works.. however.. it seems that it is being sent from my TCP port.. but 'Ethereal' is saying its being moved to a different port.... I thought this might be my router, and changed to a different one, but its doing the same thing ...

 

This is what I get...

 

I sent data out ipaddress:9000 and ethereal says

9000 > insertrandomport

so when the data gets to the other computer it reads it coming from an incorrect port and ignores it...

 

I have setup the router for start and end port to be both at 9000 on TCP and restarted it to make sure the changes have sticked.

 

Please could someone help me .. .

 

Thanks

Daniel.

  • Administrators
Posted

Is the application failing to connect correctly when using port forwarding? If so does it work correctly when the two PCs are on the same network segment?

 

You need to be careful when treating ports as absolute end-points with monitoring tools as they don't work as it would first appear. Is the client application appearing to connect to the correct port but from a different port? If so that is perfectly normal - the assigned port number is for the destination to listen on and it doesn't require the client to also be using the same number.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Is the application failing to connect correctly when using port forwarding? If so does it work correctly when the two PCs are on the same network segment?

 

You need to be careful when treating ports as absolute end-points with monitoring tools as they don't work as it would first appear. Is the client application appearing to connect to the correct port but from a different port? If so that is perfectly normal - the assigned port number is for the destination to listen on and it doesn't require the client to also be using the same number.

 

Yes, the program works fine when on the same network segment.

 

How do you tell it to listen on a certain port if it sends on a completly random one...

And it was working so well! bleh :confused:

  • Administrators
Posted

If the router is forwarding the port the server application is listening on to the correct internal ip / port combination then you should be able to get a client to connect to it.

 

Are these applications talking over the internet or just over an internal router? If you are connecting over the internet which router(s) have you configured and how?

 

The router between the client and the internet / isp should simply allow outbound communications on the specified port. The router at the server side should forward the listening port to the correct internal ip address.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
If the router is forwarding the port the server application is listening on to the correct internal ip / port combination then you should be able to get a client to connect to it.

 

Are these applications talking over the internet or just over an internal router? If you are connecting over the internet which router(s) have you configured and how?

 

The router between the client and the internet / isp should simply allow outbound communications on the specified port. The router at the server side should forward the listening port to the correct internal ip address.

The program works on my LAN, but when I try and get it to work outside if it, it won't connect.

As I said, I was scanning the ports and the program tries to connect on a port, but its not the one I tell it to connect and its not the port i'm trying to forward.. so I'm very confused.

I have a dlink 504, i've configured port forwarding before, i'm not sure why its not working the way I want it now though...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...