L.M. wrote:

Hi,
I am using "VNC Free Edition 4.1".

o At PLACE_1, I have:
~~~~~~~~~~~~~~~~~~~~~
- a LAN "192.168.0.0/24" ;
- a router with a public IP "W.X.Y.Z" ;
- a host A="192.168.0.6" running a VNC server.

o At PLACE_2, I have:
~~~~~~~~~~~~~~~~~~~~~
- a LAN "192.168.1.0/24" ;
- a host B="192.168.1.2" on which I want to run a VCN viewer
 (via a HTTP server) to connect to the VNC server running on A.

o First situation:
~~~~~~~~~~~~~~~~~~
My router is configured to transmit everything it receives
on its port 5900 to host A on the port 5900 (port forwar-
ding).

If I run a VNC viewer (not via a browser) on host B, I
manage to connect the VNC server on host A. It succeeds.

o Second situation:
~~~~~~~~~~~~~~~~~~~
- Now, if I configure my router so that everything it receives
 on its port 5800 is transmitted to host A on port 5800
- and type in a browser: http://W.X.Y.Z:5800/

I have the following message:
"java.net.ConnectException: Connection timed out: connect"

o Notice:
~~~~~~~~~
If I run http://www.realvnc.com/cgi-bin/nettest.cgi on the server
it says:
 "The ip address requesting this web page is W.X.Y.Z (REMOTE_ADDR)
  Connecting to port 5900 succeeded
  Waiting from server to send version string"
Why port 5900 and not port 5800?

For the web-based viewer, you need to know it uses both port 5800 and 5900. You point your browser to port 5800, which is a html-page that fetches a java-based vncviewer. This javabased vncviewer is verry similar to the binary viewer: it uses port 5900 for the vnc-communication.

The used html is relative simple. You can create your own page that starts the java code with options you like. If you fetch a unix (linux) variant of vnc and extract that, you can see a directory with the java-files in there. The other files are prepared html-pages (with an other extention) which you can use as a base for your webserver.

Keep in mind, if a java application is started from a html page, it can only connect to the server it comes from. Hence, that must do the prort forwarding. Since you control the html-page, you controll the options passed to the java-viewer, including the used port. As far as I know, only the commercial vnc-variant can speak both html and vnc over the same port. All others need to use 2 ports.



Thanks in advance for your help.
Leon
_______________________________________________
VNC-List mailing list
[email protected]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
_______________________________________________
VNC-List mailing list
[email protected]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to