Ports

zhchua

Limp Gawd
Joined
Aug 20, 2000
Messages
351
I have this very simple question,

If for example, I have a VNC server running at port 1289, and I'm trying to connect to it from my PC, which port will it use to send the packets out to the VNC Server?

Does it use the same port as the listening port of the server or is it totally random?

Because, I have a VNC Server running from my house and I try to connect to it from work but I just can't seem to connect on.


- Extra Question, Optional -
My company blocks certain ports, how should I configure such that I can use those outgoing ports from my company to connect to my VNC?


Thanks again guys,

P/S: If there's some book or text I can read to help me understand how softwares interact with the ports, feel free to link me, I'm willing to learn.
 
You might want to look into ssh tunneling. It is often used as a secure method of tunnelling apps through ssh ports.

As for your current trouble, I am not 100% sure on VNC, but many use the listening port to start a connection, then they negotiate some off the wall port above 1024 I think to connect on the rest of the conversation. This way you can have multiple connections going on. The general firewall rule is to allow related connections. What sort of firewall are you using?
 
Most software will give you this information on their support pages or in the help files, mostly because this type of problem happens often enough for it to be part of a FAQ of some sort. I'd say go to the website for your software and look through the FAQ's and Technical Doc's.
 
A search on the Neohapsis ports list comes back with these results:

Code:
Port 5800 Protocol TCP Name vnc 
  
Port 5801 Protocol TCP Name vnc 
  
Port 5900 Protocol TCP Name vnc 

Port 5901 Protocol TCP Name vnc-1 

Port 5902 Protocol TCP Name vnc-2

Noodle around with it - or do some more Googling.
 
Is it true to say that most applications use ports defined by the software itself, and there's no way of selecting which port to use to send outgoing packets for certain apps?
 
deuce868 said:
true, apps are specified to use specific ports. Some let you change them. for instance apache can be run on any port to provide web service.

For those that can't change...you can tunnel. That is where the ssh tunneling I was talking about comes in.

http://www.ccs.neu.edu/howto/howto-sshtunnel.html

thanks for the excellent resource. I'm reading through it now, seems like I still need to find out which port is my vnc viewer using to connect to the vnc server? How can I do that?
 
Back
Top