LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2012, 05:07 PM   #1
Volofrog
LQ Newbie
 
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4

Rep: Reputation: 0
using ssh on remote computer to connect to home computer behind two routers


I have used ssh to login remotely to other computers. But when I tried to login to my home computer, I have run into a problem.

My home network is a 192.168.0.xxx. I used the website WhatIsMyIP and found out that my IP was 67.127.xx.xx. When I had problems connecting, I noticed that my router shows its wan connection is 192.168.1.64.

From this information, I believe that when I try to remote into my home computer, I use the internet IP 67.127.xx.xx which connects me to my dsl provider. The dsl provider connects that IP to a router which issues an IP of 192.168.1.64 to my home router. My home router handles the next step.

The above means that my home computer is behind two routers and I only have control of my own router. I certainly do not have controlvof the dsl provider's router and I cannot get rid of it.

Since I know the IPs of each step, is there an ssh command to allow me to connect from the remote computer to my home computer through both routers?
 
Old 12-21-2012, 09:54 PM   #2
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Rep: Reputation: 30
Port Forwarding

All you need to do is set up Port Forwarding on your router.

My routers has the same set up as yours (the IP my service provider uses is different than the one I get from my router). Anyway ... just port forward ports such as 80 and 22 (web, ssh) to the ip address of your home server. That way you can serve out web pages and ssh into your system whenever you like.
 
1 members found this post helpful.
Old 12-22-2012, 08:06 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by Volofrog
I noticed that my router shows its wan connection is 192.168.1.64.
I hate to say this, but I think you're pretty much screwed. Personally, I loathe ISPs that use NAT on their customers for precisely this reason. Which leaves you with a couple of options: 1) Check with your ISP and see if they support IPv6. If they do, that would get you usable addresses all the way through. 2) Find yourself a new ISP that doesn't NAT their customers.

Quote:
Originally Posted by tonyfreeman
All you need to do is set up Port Forwarding on your router.
That isn't going to work in this case. The problem is that the "real" IP ends at the ISPs router. Volofrog's router only has a NAT address, and those aren't routable.

Last edited by Hangdog42; 12-22-2012 at 08:08 AM.
 
1 members found this post helpful.
Old 12-22-2012, 11:21 AM   #4
Volofrog
LQ Newbie
 
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4

Original Poster
Rep: Reputation: 0
My thanks to both tonyfreeman and Hangdog42 for their responses. I believe that what Hangdog42 said about being stuck behind the dsl NAT address is the real problem. I had been researching this for many days and had come to the same conclusion. I posted here because I hoped that I might have missed a solution:-)
 
Old 12-25-2012, 12:57 AM   #5
Volofrog
LQ Newbie
 
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4

Original Poster
Rep: Reputation: 0
Talking Found a real, easy solution

I learned something new yesterday that I want to pass along. I was talking to an IT professional about my problem and he told me that my DSL modem in my house was also a router.

I went home and followed his instruction by looking on the label of the DSL modem for login information. I logged into the dsl modem and found a section where you could set up NAT translation and more importantly, where you can turn it off. When I turned NAT off, the DSL modem passes the internet IP through to my router. Now I can port forward and ssh to my hearts content.

I hope that this piece of information helps someone else.
 
Old 12-25-2012, 07:07 AM   #6
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Smile

Quote:
Originally Posted by Volofrog View Post
I learned something new yesterday that I want to pass along. I was talking to an IT professional about my problem and he told me that my DSL modem in my house was also a router.

I went home and followed his instruction by looking on the label of the DSL modem for login information. I logged into the dsl modem and found a section where you could set up NAT translation and more importantly, where you can turn it off. When I turned NAT off, the DSL modem passes the internet IP through to my router. Now I can port forward and ssh to my hearts content.

I hope that this piece of information helps someone else.
This is called bridging. I have been bridging my cable modem for years...
 
Old 12-25-2012, 12:38 PM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833
Quote:
When I turned NAT off, the DSL modem passes the internet IP through to my router
You do realize that means that you are connected directly to the internet now. Your machine can be connected to directly from anywhere on the web. You do have a firewall up and running on all of your machines behind the router?
 
Old 12-25-2012, 02:58 PM   #8
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Quote:
Originally Posted by teckk View Post
You do realize that means that you are connected directly to the internet now. Your machine can be connected to directly from anywhere on the web. You do have a firewall up and running on all of your machines behind the router?
He indicated that there was a second router....
 
Old 12-25-2012, 03:02 PM   #9
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
[QUOTE=Volofrog;4854656].......
From this information, I believe that when I try to remote into my home computer, I use the internet IP 67.127.xx.xx which connects me to my dsl provider. The dsl provider connects that IP to a router which issues an IP of 192.168.1.64 to my home router. My home router handles the next step.

The above means that my home computer is behind two routers and I only have control of my own router. I certainly do not have controlvof the dsl provider's router and I cannot get rid of it.

.......QUOTE]
He indicated that there is a second router in his home
 
  


Reply



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
Configuring SSH on Ubuntu to connect to remote computer guitarman Linux - Networking 14 11-06-2012 07:07 AM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 03:01 AM
Remote access to my home computer Pedroski Linux - Networking 5 02-17-2005 07:34 AM
accessing my home computer from remote location blacbastard Linux - Newbie 3 03-30-2003 09:52 PM
accessing home computer from remote location blacbastard Linux - Networking 2 03-30-2003 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:06 AM.

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