port mapping and VNCviewer

Jonathan Morton chromi "at" cyberspace.org
Mon, 03 Jan 2000 12:26:18 +0000


>Hi all,
>
>I have an interesting problem and am not sure what exactly is at fault
>yet. I have one dedicated IP address [for this example, it will be
>1.2.3.4] and it's got a single NIC and is running IPNetRouter [MacOS
>8.6]. This Mac has IP forwarding and masquerading on, so that it also has
>an IP of 192.168.0.1. I have 2 PCs which use this Mac as a router; their
>IPs are 192.168.0.3 and 192.168.0.4.
>
>When both PCs run the VNC server, I can connect to them just fine if I run
>the viewer on either PC [or Mac] by connecting to the internal IP address.
>However, I want to be able to connect to these 2 PCs from outside my
>network, so I setup IPNetRouter to forward all traffic which hits
>1.2.3.4:3333 to redirect to 192.168.0.3:5922 [the VNC display is set for
>22 on that PC].
>
>But when using VNC viewer on the Mac, I get an error right away stating
>that it "received a disconnect signal". When I telnet to a host outside my
>network and from that host, telnet to port 3333 of my IP, I do connect
>[and my Mac isn't, for these tests, running the VNC server] to my internal
>PC on port 5922.

My word, you got IPNR working <grin>.  Didn't work at all on this Quadra,
which I got a second NIC for, specially (got a weird sysadmin at this uni).
I eventually plumped for a hub, hoped they wouldn't notice, and it seems to
work <grin>.

>As I read in the docs, if one puts a display number greater than '99' in
>the VNC viewer open-connection dialog, it is supposed to honor that as a
>port number. I tried the above from one of my PCs, and it took much longer
>to time out [and stated simply, "Failed to connect to server"].

But the PCs can only see the 192.168.0.* addresses, because that's what
subnet they are on.  If you connect using 192.168.0.3:5922 (by entering 22
n the display field) it should work.

>This happens when I try to contact either PC via the port mapping on the
>Mac. I have only read one article in the list archives about IPNetRouter
>and that was with someone using 2 NICs. Since I can connect via telnet
>from an outside host, does this mean that the viewer isn't recognizing
>'1.2.3.4:3333' as a valid IP/port number?

So, on the Mac, you are entering 1.2.3.4:3333.  Depending on how your
TCP/IP is set up, and how Open Transport works, that may or may not be
visible to your own machine (strange or what?).  Try 127.0.0.1:3333
(localhost), and if that works, that's your problem and nowt can be done
about it.  In any case, I'd recommend using the 192.168.0.3:5922 from the
Mac anyway, as that's the shortest path.

Or, set up a second mapping on IPNR, which detects 192.168.0.1:3333 and
forwards it to the right place - dunno how useful that'd be tho.

>Any enlightenment would be appreciated...

It's a pleasure :).

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi "at" cyberspace.org  (not for attachments)
uni-mail: j.d.morton "at" lancaster.ac.uk



---------------------------------------------------------------------
The VNC mailing list - see http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------