Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
remote ssh into my home network
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
the_darkhorse13
n00b
n00b


Joined: 19 Mar 2004
Posts: 21

PostPosted: Sat May 08, 2004 11:19 am    Post subject: remote ssh into my home network Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Sat May 08, 2004 11:23 am    Post subject: Reply with quote

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
View user's profile Send private message
the_darkhorse13
n00b
n00b


Joined: 19 Mar 2004
Posts: 21

PostPosted: Sat May 08, 2004 11:32 am    Post subject: Reply with quote

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
View user's profile Send private message
LeTene
Guru
Guru


Joined: 02 Mar 2004
Posts: 348
Location: Ah'll glass ye!

PostPosted: Sat May 08, 2004 11:35 am    Post subject: Reply with quote

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 :P
_________________
Docs, Tips & Tricks at the Gentoo Wiki page.
Back to top
View user's profile Send private message
the_darkhorse13
n00b
n00b


Joined: 19 Mar 2004
Posts: 21

PostPosted: Sat May 08, 2004 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
BCC
n00b
n00b


Joined: 28 Apr 2004
Posts: 51

PostPosted: Sat May 08, 2004 11:43 am    Post subject: Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Sat May 08, 2004 11:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum