LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to access a linux server at home, from work ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-access-a-linux-server-at-home-from-work-804812/)

linux_sj 04-28-2010 02:05 PM

how to access a linux server at home, from work ?
 
Hi,

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 ?

Ringmaster 04-28-2010 02:23 PM

i'm assuming putty would probably work.

ncsuapex 04-28-2010 02:23 PM

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.

Hangdog42 04-28-2010 03:52 PM

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.

jefro 04-28-2010 05:07 PM

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.

ahmed_as8 04-28-2010 05:26 PM

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

linux_sj 04-28-2010 10:37 PM

Quote:

Originally Posted by jefro (Post 3951128)
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.

kurwongbah 04-28-2010 10:58 PM

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!

rikijpn 04-28-2010 11:17 PM

you don't need a fixed IP. Just use dynDNS to get an address (like "somenameIlike.dnsalias.com") 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 myusername_at_home@subdomainIchose.dnsdomainname.com", 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.


All times are GMT -5. The time now is 07:18 AM.