LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-24-2018, 02:47 PM   #1
seraf
LQ Newbie
 
Registered: Feb 2006
Posts: 17

Rep: Reputation: 0
Question What's the difference between VNC through SSH tunnel and VNC SSL?


I want to have my home machine be accessible from the Internet through VNC.

If I run a x11vnc server, connect to the machine remotely through ssh -L, and then connect with VNC client, I still need to have SSL enabled on x11vnc. And if I enable SSL on x11vnc - why can't I just securely(?) connect straight to the machine through VNC client that supports SSL?

I'm not talking about portforwardings, just from security perspective (or in general), where does the difference lie when I connect

vncviewer IP:5900

versus

ssh -L 5900:localhost:5900 username@IP
vncviewer localhost:5900

From a user experience, I have to enter two passwords on the second scenario, however isn't it a bit more dangerous too to have SSH open to the world?

P.S. I know not to use standard ports, and I can't create strict rules on my router limiting IPs that can connect.
 
Old 04-24-2018, 09:57 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
What I would do is to set up a cryptographically-secured OpenVPN server on your home machine, with tls-auth protection as I describe in my blog here. Then, restrict everything so that it only listens to ports that represent successfully-connected OpenVPN clients, and use firewalls to guarantee that there is no other avenue in or out.

Now, you simply use your client – which contains your tls-auth credential and your non-revoked, one-of-a-kind, 4096-bit certificate – to connect to your tunnel. From there, you can simply use VNC, or anything else you please.

Anyone who "port-scans" your system will find ... nothing. Anyone who suspects that you have an OpenVPN server will be unable to detect it. The number of unauthorized access attempts will be zero.

And yet, you won't be inconvenienced at all. You can reach your home system as though it were sitting on a nearby subnet accessed through a router – because OpenVPN is "a secure software-implemented router." You don't have to use any application-specific security or cumbersome tunneling, or bear the risk that something might not actually be secured.
 
Old 04-24-2018, 11:07 PM   #3
kfritz
Member
 
Registered: Aug 2006
Distribution: Slackware, OpenBSD, CentOS, Ubuntu
Posts: 99

Rep: Reputation: 31
Disclaimer: I never use vnc, but I do tunnel other protocols through ssh. As far as I can tell, the vnc ssl solution is encrypted, but not authenticated in any way. A vnc expert can correct me if I'm wrong. This means that just about anyone can connect to your login page. Hope your system is up to date.

For the ssh tunnel, if you're entering your password twice, you're doing it wrong. You shouldn't expose ssh with passwords enabled -- you should always use key-based authentication. In my opinion, I trust ssh more than vnc or even openvpn, and every one of my servers has ssh port open. In my experience, the annoying password guessers filling your logs are eliminated by moving ssh to the right port number.
 
  


Reply

Tags
ssh access, vncserver, vncviewer



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Multi-hop VNC tunnel over SSH deesto Linux - Networking 6 10-25-2010 07:38 AM
[SOLVED] ssh tunnel and vnc question unix1adm Linux - General 1 03-02-2010 04:37 AM
setting up ssh tunnel for vnc jr0 Linux - Networking 3 10-22-2005 11:38 AM
SSH tunnel reversed for VNC...Possible? silence Linux - Networking 1 07-22-2004 09:42 AM
VNC and SSH Tunnel Syncrm Linux - General 13 04-06-2003 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration