Kevin M. Hilscher wrote:
>I know that display no's/ports above 99 must be a complete number (ie:
>5265, not just 65). But I must be missing something because I would like
>to use ports 6000 - 7000, so I assigned 6000 as a display number, and so
>on. However, after doing a netstat, VNC seems to be listening on ports
>in the 11,000 range. Does someone now the algorithm for display no. to
>port mappings above 99?
To quote from Joe Knapka:
OK, we want to connect to port (say) 2001. Since the port number is
5900+display number, that means we need to connect to display
-3899. You can't enter negative numbers, but you *can* enter a number
that is large enough to overflow the 16-bit port number when 5900
is added, and thereby result in the correct port number. This
works because WinVNC stores the port number as a 32-bit value,
and truncates it to 16 bits when it's actually used.
If you want to use the WinVNC propertied page to do it, then
for port 2001, the correct number is 65536-5900+2001 = 61637, so
enter 61637 in the WinVNC properties "Display Number" field. (Note,
65536 is 2 to the 16th power, which, when truncated to a 16-bit
value, is 0).
The WinVNC viewer seems to take display numbers outside of the
expected range (which is? I'm guessing 0-99) to be port numbers,
so to connect in this manner you can just use "hostname:2001".
Or you can use 61637+5900 = 67537: "hostname:67537". Same result.
If you want to use port 80, you need 65536-5900+80 = 59716 in the
WinVNC "Display Number" field, and connect to 65536+80 =
"hostname:65616". Note that in this case you *must* use
the large port number, since "hostname:80" would cause the viewer
to connect to port 5980.
You can also use REGEDIT.EXE to directly install the desired port
number in \\HKEY_CURRENT_USER\Software\ORL\WinVNC3\PortNumber - that
is, you can enter decimal 2001 in that location to make WinVNC listen
on port 2001; no arithmetic required.
I have tested all this, confirmed that it works, and sniffed the
network to be sure the correct port is used. Let me know if you
have any trouble.
---
The above message was posted today, could you not have checked the archive?
Seth
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------