VNC to a server behind a NAT router
Tue Nov 19 23:40:01 2002
One thing about that: most inexpensive NAT routers do "virtual servers"
rather inflexibly. i.e., if you want to connect to port 5280 on an
internal machine, it must be exposed outside as port 5280. Of course, you
can just have your vncservers on different displays, moving them to other
ports. Of course, if you're using Xvnc, you can tell it to use whatever
ports you feel like.
firstname.lastname@example.org reorder name and reverse domain
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"
Illtud Daniel <email@example.com>
Sent by: firstname.lastname@example.org
11/19/02 09:16 AM
cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
Subject: Re: VNC to a server behind a NAT router
Rafael Rubio wrote:
> As many others, my configuration is a small LAN connected to the
> through an ADSL router that performs NAT, i.e. all the PC's have subnet
> addresses (10.0.0.X), which means they cannot be accessed as such from a
> remote VNC client through the Internet.
> I know the public IP address of the router, but haven't found anything
> to build an IP address for individual PC's in the LAN (the ones running
> servers) that can be addressed from a remote VNC client.
OK, this is an expanded answer to the one I gave somebody else
asking about VNC'ing to a server behind NAT. I assumed that
they had control of the NAT, I didn't realise that some ISPs
NAT'd people's connections.
So, I'm assuming that this is your setup (xDSL with home router):
(fixed font for this, folks)
| xDSL |
--------POTS--------| ROUTER |----ethernet------PC1 (10.0.0.1)
| |----ethernet------PC2 (10.0.0.2)
| |----ethernet------PC3 (10.0.0.3)
In this example, the router has an IP address a.b.c.d (static, I
assume - you say you know it). Since the router is the only one
with a 'proper' (ie, public - ie, addressable through the internet)
IP address, you can only connect your VNCviewer to ports on this
router. Your problem is that you want to connect your viewer to
port 5900 on PCs 1,2 & 3. So you need to forward 3 ports on the
router to port 5900 on PC1,2 & 3.
So, go into your router config, find 'port forwarding' (this may
be called something else - anyone seen a different term for this?)
and setup (for example)
forward router port 5901 -> 10.0.0.1:5900
forward router port 5902 -> 10.0.0.2:5900
forward router port 5903 -> 10.0.0.3:5900
....so you can now connect via the internet to your PCs using
vncviewer, and connecting to a.b.c.d:1 will give you PC1,
a.b.c.d:2 will give you PC2 etc.
Does that make sense? Post the model of your router and somebody
can probably give you the exact details of the port forwarding
Illtud Daniel email@example.com
Uwch Ddadansoddwr Systemau Senior Systems Analyst
Llyfrgell Genedlaethol Cymru National Library of Wales
Yn siarad drosof fy hun, nid LlGC - Speaking personally, not for NLW
VNC-List mailing list