Discussion:
Will TightVNC work with Dynamic IPs
Byron Wise
2006-07-24 21:06:35 UTC
Permalink
I have a computer at my second home across country and want to run it as a
TightVNC server so I have access to it. However, the IP only gives dynamic
ip address out. Can I still use TightVNC or do I need to add a third party
software like DynDNS or something?

Thanks,
Byron
Dave Ihnat
2006-07-24 22:42:29 UTC
Permalink
Post by Byron Wise
I have a computer at my second home across country and want to run it as a
TightVNC server so I have access to it. However, the IP only gives dynamic
ip address out. Can I still use TightVNC or do I need to add a third party
software like DynDNS or something?
No, it needs something like DynDNS. But do *not* just let a VNC server
listen on the 'Net; that's a security nightmare waiting to happen.

In the following, I'll assume you got CygWin and the target is a Windows
system.

Either get one of the VNC distros that have SSH built in, or install
CygWin (http://www.cygwin.com) and make sure to include and install
the OpenSSH package (in Networking). You'll have to configure OpenSSH,
but that's pretty easy--open a CygWin shell and run ssh-host-config.

After you've configured your host, it's a good idea to edit the file
/etc/sshd_config (again, from within the CygWin shell) to restrict access
to only your account, at least. You'll have to set write permissions
to do so, and clear them afterward.

In detail:

1. Install CygWin.
2. Start a bash shell (there will be a CygWin icon on your desktop).
3. cd /etc
4. chmod a+w sshd_config
5. Edit sshd_config, then write it.
6. chmod go-w sshd_config

The editing will, of course, depend on your familiarity with editors; I can
give you the keystrokes for 'vi', but you may want to familiarize yourself
with it. Otherwise you can edit sshd_config as a text file using Windows
tools--it'll be in (by default) C:\CygWin\etc\sshd_config.

cd /etc
vi sshd_config
:$
o
AllowUsers loginname
ESC
:wq

In the above, substitute your real login on the target machine for
"loginname". Another change that may be a good idea is to find the
line "#MaxStartups 10" and change it to "MaxStartups 5:50:10".

Then make sure the CygWin SSH service is started. If you're running a
firewall, make sure that port 21 is directed to the target machine (or
if you're running a local software firewall--hopefully not the Windows
firewall--enable the SSH program).

You then will ssh into the DynDNS address; I recommend PuTTY. Make sure
to create a tunnel into the system--Local port 5900 to localhost:5900.

Finally, after logging in, just run the VNC Viewer and connect to "localhost".

It's not as complicated as explaining it line-by-line would make it look, and
there are plentiful pointers to configuration on the 'Net.

Good luck,
--
Dave Ihnat
President, DMINET Consulting, Inc.
***@dminet.com
John Aldrich
2006-07-24 23:54:38 UTC
Permalink
Post by Dave Ihnat
No, it needs something like DynDNS. But do *not* just let a VNC server
listen on the 'Net; that's a security nightmare waiting to happen.
Seconded!
Post by Dave Ihnat
In the following, I'll assume you got CygWin and the target is a Windows
system.
Either get one of the VNC distros that have SSH built in, or install
CygWin (http://www.cygwin.com) and make sure to include and install
the OpenSSH package (in Networking). You'll have to configure OpenSSH,
but that's pretty easy--open a CygWin shell and run ssh-host-config.
Or you could just install http://sshwindows.sourceforge.net/ which includes
just the necessary parts of Cygwin to install SSH. Or you could buy ssh for
Windows from ssh.com, but that's probably not necessary or even the best
way. :-)
Byron Wise
2006-07-25 00:03:02 UTC
Permalink
Okay. I actually have set up DynDNS, port forwared Linksys router to 5800
and 5900, installed TightVNC and the DNS updater from DynDNS on another home
computer in a type of mock trial. I have everything working. I'm not too
familiar with tunneling using SSH. Can someone explain in laymans terms how
this works and fits into the server/client request paradim?

Many thanks,
Byron
Post by John Aldrich
Post by Dave Ihnat
No, it needs something like DynDNS. But do *not* just let a VNC server
listen on the 'Net; that's a security nightmare waiting to happen.
Seconded!
Post by Dave Ihnat
In the following, I'll assume you got CygWin and the target is a Windows
system.
Either get one of the VNC distros that have SSH built in, or install
CygWin (http://www.cygwin.com) and make sure to include and install
the OpenSSH package (in Networking). You'll have to configure OpenSSH,
but that's pretty easy--open a CygWin shell and run ssh-host-config.
Or you could just install http://sshwindows.sourceforge.net/ which includes
just the necessary parts of Cygwin to install SSH. Or you could buy ssh for
Windows from ssh.com, but that's probably not necessary or even the best
way. :-)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___________________________________________________________
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
John Aldrich
2006-07-25 10:39:58 UTC
Permalink
Post by Byron Wise
Okay. I actually have set up DynDNS, port forwared Linksys router to 5800
and 5900, installed TightVNC and the DNS updater from DynDNS on another
home computer in a type of mock trial. I have everything working. I'm not
too familiar with tunneling using SSH. Can someone explain in laymans
terms how this works and fits into the server/client request paradim?
SSH creates a "tunnel" that VNC flows through. Think of it as kind of like a
tunnel for traffic underneath a body of water... it allows the
cars/trucks/etc to get from point A to point B by going *through* the water
while being protected from the water. In this case the "water" is the
internet.
Once you have SSH Server installed, you won't need ports 5800 and 5900
forwarded in your router, only port 25. However, you'll need something like
PuTTY to create the tunnel for you. You'll have to have PuTTY route ports
5800 and 5900 through the tunnel. There are a number of very good "how-to"
documents for setting up PuTTY that have pictures and everything. :-)
John
Lauro Valente
2006-07-25 02:09:05 UTC
Permalink
Hello,

Is it possible to run VNC server through NAT without configuring port
forwarding?
Cause I have a PC behind that but I am not able to edit the router
configuration...
I thought using a software to emule a virtual lan, like Hamachi, but I'm not
sure that it will work... Have someone tried it to pass through NATs?
Does anybody have other suggestion?

Thanks in advance!
--
Lauro Valente,
http://athena.bluehosting.com.br/~lwv (temporary out)
Estudante Universitário (College Student)
Engenharia de Computação/7º Período - Computer Engineering (4th year)
PUC/PR - Brazil
http://laurovalente.blogspot.com/
***@gmail.com
John Aldrich
2006-07-25 10:40:24 UTC
Permalink
Post by Lauro Valente
Hello,
Is it possible to run VNC server through NAT without configuring port
forwarding?
Cause I have a PC behind that but I am not able to edit the router
configuration...
I thought using a software to emule a virtual lan, like Hamachi, but I'm
not sure that it will work... Have someone tried it to pass through NATs?
Does anybody have other suggestion?
Thanks in advance!
That's *exactly* what Hamachi was designed for.
James Weatherall
2006-07-25 12:02:44 UTC
Permalink
Hi Byron,

All VNC and VNC-based servers such as TightVNC should accept connections on
all network interfaces by default, and so should work on systems using
dynamic IP addresses. You will probably need to set up a Dynamic DNS name
for the server, however, so that you can access it remotely regardless of
address.

I'd recommend either setting up secure tunnelling to the server, or using
VNC Enterprise / Personal Edition (http://www.realvnc.com/download.html),
which has strong session security in-built. TightVNC is based on our old
VNC 3 system, which does not provide session security, and so is not
suitable for use over untrusted networks.

Regards,
-----Original Message-----
Behalf Of Byron Wise
Sent: 24 July 2006 22:07
Subject: Will TightVNC work with Dynamic IPs
I have a computer at my second home across country and want
to run it as a TightVNC server so I have access to it.
However, the IP only gives dynamic ip address out. Can I
still use TightVNC or do I need to add a third party software
like DynDNS or something?
Thanks,
Byron
Scott C. Best
2006-07-25 19:20:22 UTC
Permalink
And if you add "web proxy" to something you're stuck
behind, that's what EchoVNC was designed for. :)

cheers,
Scott
Post by John Aldrich
Post by Lauro Valente
Hello,
Is it possible to run VNC server through NAT without configuring port
forwarding?
Cause I have a PC behind that but I am not able to edit the router
configuration...
I thought using a software to emule a virtual lan, like Hamachi, but I'm
not sure that it will work... Have someone tried it to pass through NATs?
Does anybody have other suggestion?
Thanks in advance!
That's *exactly* what Hamachi was designed for.
Continue reading on narkive:
Loading...