Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-28-2010, 02:05 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 26

Rep: Reputation: 0
how to access a linux server at home, from work ?


At home - Ubuntu, running vnc, dhcp,

At work - windows 7, running vnc, dhcp.

How would I be able to access a home ubuntu workstation from my work's laptop ?

Any ideas on what is the best set up ?
Old 04-28-2010, 02:23 PM   #2
Registered: Apr 2009
Posts: 38

Rep: Reputation: 16
i'm assuming putty would probably work.
Old 04-28-2010, 02:23 PM   #3
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
you would need putty and a static IP address at home OR a service like dyndns to translate your private IP into a publicly available IP.
Old 04-28-2010, 03:52 PM   #4
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
And don't forget to get permission from your IT people at work before doing it. Many workplaces consider this sort of thing a security breach, and people do occasionally get fired for it.
Old 04-28-2010, 05:07 PM   #5
Registered: Mar 2008
Posts: 17,000

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
Ports and protocols would have to be open and maybe nat'ed.

Can we assume you mean access as in remote desktop via VNC?

Most people might use ssh or other VPN.
Old 04-28-2010, 05:26 PM   #6
Registered: Nov 2008
Location: Egypt
Distribution: Ubuntu, SuSE
Posts: 101

Rep: Reputation: 16
I did that before, I used vnc viewer in Windows 7 also you must configure your router to redirect your remote connection to the computer you want to connect to, also allow your remote settings in Ubuntu
Old 04-28-2010, 10:37 PM   #7
LQ Newbie
Registered: Mar 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Originally Posted by jefro View Post
Ports and protocols would have to be open and maybe nat'ed.

Can we assume you mean access as in remote desktop via VNC?

Most people might use ssh or other VPN.
sorry I meant remote desktop via VNC yes.
Old 04-28-2010, 10:58 PM   #8
Registered: Apr 2010
Posts: 82

Rep: Reputation: 23
Basic steps should be:
1) Get yourself a fixed IP from your ISP
2) Get yourself a fixed IP at home for the Ubuntu machine
3) Run vncserver on the Ubuntu machine
4) If there's a firewall on the Ubuntu machine open up the port vncserver is listening on (Used to be 5901) (I'm getting old...
5) Program your ISP modem to forward that port from your ISP-IP to your Ubuntu IP (Might be a good idea to only allow that originating from a IP in the range of the ISP connection you have at work...)
6) Get your network admins at work to allow you to open that port on your ISP-IP (hard part...)
7) Run vncviewer on the windows7 box and use your ISP-IP:5901 address to connect

Alternatively (or even better) you could go for a ssh tunnel connection to home (encryption!). Needing the port number above to be changed to 22.
On the windows7 box you would run putty and maybe all kind of other little utilities to get the tunnel setup (Use google for the details on that!)
In the end you would get a 'local' port on w7 that gets tunneled via ssh to the 'server'.
Than you can connect from w7 to your vncserver with vncviewer by using the address: localhost:5901

Good luck!
Old 04-28-2010, 11:17 PM   #9
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
you don't need a fixed IP. Just use dynDNS to get an address (like "") so you don't need to know your computer's IP when you try to connect.

1) At home-> install ssh's server, generate RSA keys, and get the correspondent files to your work's computer (read an ssh tutorial somewhere). Open your router's tcp's 22 port, and forward it to the computer with ssh in it.

You should probably edit your /etc/hosts.allow file, etc, to allow only IP's you know to connect to your computer, otherwise your log is gonna get terribly full of "authorization failed... someIPfromchina ... user/password wrong" kinda lines from people who have too much spare time in their hands.

2) At home -> install "inadyn" to update your IP to your dynDNS address, and run it before going to work, or just keep it running in the background(as a daemon).
3) At work -> get putty? or any other program that can run a shell/ssh, and try having steps 1 and 2 clear, try "ssh", it'll ask your passphrase, and voila.

You can also use "ssh -X ..." to connect, to use X programs too, but you need an X server/compatibility program on your work's machine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Securely access remote internal networks and work from home LXer Syndicated Linux News 0 01-09-2010 03:20 AM
Setting up VNC to access home computer from work through corporate network gopi.d Linux - Networking 2 12-19-2007 04:55 PM
how to access my pc at home from work tacca Linux - Networking 1 07-19-2006 08:53 AM
Can't access Apache server at home HGeneAnthony Linux - General 2 04-19-2006 02:11 AM
WinXP home client sees Linux Samba server but no access to shares IslanderTexas Linux - Software 27 02-22-2006 04:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:05 PM.

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