PDA

View Full Version : Connecting to home linux box from work xp pro



nicorellius
11-13-2004, 12:12 AM
I am trying to connect to my home PC, running linux, from my work PC, running XP Pro. I work at a hospital, so obviously there is a big network here. I use Cygwin for a linux-like environment here at work and at home I have a Linksys NR041 router connecting a winXP pro box and the linux box I wish to connect to.

Anyone have any idea how I mght do this. So far, I think I set up my linux box to hear me using sshd and then from work try:

ssh username@IPaddress.

But I am not sure if I am on the right track.

Any thoughts?

Many thanks! :shock:

Hug It
11-13-2004, 01:08 AM
well you would have to know the IP address of your router, not your pc being it's going to have a private (non-routable) address... then you would have to open the port for ssh on your router and forward all incoming requests to your linux box's internal IP

gnarvaja
11-13-2004, 02:28 AM
well you would have to know the IP address of your router, not your pc being it's going to have a private (non-routable) address...

Depending on how your provider works, it may not be possible. Many do NAT, so the router's IP address may be private too. You would then have to talk to your Internet provider to see if they have the specific ports open for ssh or the protocol you will use. Many don't ... Even if they do, then you'll have to find out which one is your public IP address, which is tricky.

G

jzhai
12-07-2004, 11:33 PM
You don't have to ask static IP address. Your IP may be same for most time. Just type in 192.168.1.1 which is router's IP, go to status, check address. Then remember that IP and ssh that IP.

gnarvaja
12-09-2004, 07:10 PM
You don't have to ask static IP address. Your IP may be same for most time. Just type in 192.168.1.1 which is router's IP, go to status, check address. Then remember that IP and ssh that IP.

If I do that on my set up this is what I would get the address 192.168.0.1, which is the address my DSL modem DHCP server assigned the router, if I check the DSL modem, it will give me a WAN address aaa.bbb.ccc.ddd (not important which one is), which is assigned by my ISP. If I check the IP address that world sees (there are many ways to do this), it will be zzz.yyy.xxx.www, different from the one my DSL modem has and also controlled by the ISP.

So if I try to connect from the outside world to a specific PC on my network, I can only use the zzz.yyy.xxx.www address. This would only work if my ISP hasn't blocked the ports and if I tunnel these ports properly through my internal network to the PC I want to access remotely. Many ISPs refuse to open all ports for domestic users. The specifics vary from ISP to ISP. Most cable modem providers are more restrictive than DSL providers. Most technical support departments won't have a clue of what you are trying to do unless you have a commercial account. Believe me, I tried.

My $.02
--GN

Markus
12-09-2004, 07:23 PM
www.whatismyip.com is the fastest way to check your IP. But do remember to disable any proxy in your browser or you'll see the proxy servers IP. This will of course only work if your ISP doesn't nat the address.

EDIT: You don't have to worry about the browsers proxy if you do: links www.whatismyip.com , press q to quit.

pureone
12-09-2004, 09:15 PM
this is what i would do.

i would find out my ip at my home box before i go work etc. set up the servers that i want and the port forwarding stuff

routers ip = 192.168.1.1

server machine in nat enviroment = 192.168.1.2

your machine at work = not important

from your home box go to www.whatismyip.com (make sure you disable proxies)

check the ip go to www.no-ip.com

create a domain for your ip (isp)

then from your computer at work

ssh yourdomain

now you will have to update the domain name for ever time you get a new ip but its easyer then having to remember the ip each time.