View previous topic :: View next topic |
Author |
Message |
the_darkhorse13 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Mar 2004 Posts: 21
|
Posted: Sat May 08, 2004 11:19 am Post subject: remote ssh into my home network |
|
|
Just a quick question. I want to ssh into my home network from outside. So far I can ssh from one computer to another inside my house, but I ran into the little problem of having a broadband router as my dhcp server. Basically all the computers on the network have the same IP address for the outside world. I have a D-Link DSL-504. There are a LOT of options for it, but I have no clue as to where to start. Thanks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sat May 08, 2004 11:23 am Post subject: |
|
|
You need to forward the port for SSH (22 by default, but you can use anything you like) to a machine on the LAN.
There is one (obvious) condition: that machine has to have a fixed IP address!
Then enter the router's web config thingy and look for a menu that allows you to set up a "virtual server" (it may be called something else).
Enter the info you need (port to forward, ip of machine on LAN) and you should be set! _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
the_darkhorse13 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Mar 2004 Posts: 21
|
Posted: Sat May 08, 2004 11:32 am Post subject: |
|
|
I see what you're saying. I've found the Port Forwarding config on the router, so I'll give it a go. But it's kind of hard at home to simulate a remote connection Just another question: When using the port forwarding, will it only forward to the single computer? What I'm saying is that will it only forward data from port 22 to just my computer, or is there a trick to make it forward to my computer or my parent's computer? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
LeTene Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1660539411409107d933978.jpg)
Joined: 02 Mar 2004 Posts: 348 Location: Ah'll glass ye!
|
Posted: Sat May 08, 2004 11:35 am Post subject: |
|
|
the_darkhorse13 wrote: | I see what you're saying. I've found the Port Forwarding config on the router, so I'll give it a go. But it's kind of hard at home to simulate a remote connection |
Are you SSH'ing in from a work machine? If you have an SSH server on that, then log on and SSH back home - it's how I tested mine ![Razz :P](images/smiles/icon_razz.gif) _________________ Docs, Tips & Tricks at the Gentoo Wiki page. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
the_darkhorse13 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Mar 2004 Posts: 21
|
Posted: Sat May 08, 2004 11:39 am Post subject: |
|
|
oh wait... If I can SSH into my machine, then I can just SSH from there to another machine. Right? I'm at home right now. I wanted to try this with my laptop if I'm ever on the road and I needed something. I saw a guy do a remote connection when I went to a LUG to get his presentation for his speech. I'll definitely give it a go when I get a chance. Thanks for the info! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BCC n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 28 Apr 2004 Posts: 51
|
Posted: Sat May 08, 2004 11:43 am Post subject: |
|
|
Hi,
Imho, there is not trick to make your router forward to your computer _or_ to your parent's one. For each port, your router has to know one IP address to forward that port to.
You could do either :
(1)
forward port 22 to your computer's port 22 (like you did)
and
forward port 23 to your parent's computer's port 22
(23 or any other port you don't use)
then you could ssh to your parent's computer using the following command :
ssh -p 23 <your router's IP>
(2) or (obviously)
forward only port 22 to your computer's port 22, and from there make another ssh connexion to your parent's computer.
Hope this helps |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sat May 08, 2004 11:45 am Post subject: |
|
|
the_darkhorse13 wrote: | I see what you're saying. I've found the Port Forwarding config on the router, so I'll give it a go. But it's kind of hard at home to simulate a remote connection Just another question: When using the port forwarding, will it only forward to the single computer? What I'm saying is that will it only forward data from port 22 to just my computer, or is there a trick to make it forward to my computer or my parent's computer? |
Not quite sure what you mean here.
If you want to forward more than one port - sure, up to as many as the router will allow you.
If you mean send one port to multiple computers - no, that's theoretically impossible.
If you mean run SSH on more than one computer and choose which one to connect to - like I said, you decide what port it runs on, just forward 2222 to another machine that runs SSH on port 2222.
Or 6666, or 53245, or whatever. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|