Ports... argh

Illusion

Well-known member
Joined
Aug 7, 2003
Messages
105
Location
Uk
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.
 
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 dont 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 doesnt require the client to also be using the same number.
 
PlausiblyDamp said:
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 dont 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 doesnt 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:
 
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.
 
PlausiblyDamp said:
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 wont 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 im trying to forward.. so Im very confused.
I have a dlink 504, ive configured port forwarding before, im not sure why its not working the way I want it now though...
 
Back
Top