LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   using ssh on remote computer to connect to home computer behind two routers (https://www.linuxquestions.org/questions/linux-networking-3/using-ssh-on-remote-computer-to-connect-to-home-computer-behind-two-routers-4175442494/)

Volofrog 12-21-2012 05:07 PM

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?

tonyfreeman 12-21-2012 09:54 PM

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.

Hangdog42 12-22-2012 08:06 AM

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.

Volofrog 12-22-2012 11:21 AM

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:-)

Volofrog 12-25-2012 12:57 AM

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.

utanja 12-25-2012 07:07 AM

Quote:

Originally Posted by Volofrog (Post 4856409)
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...

teckk 12-25-2012 12:38 PM

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?

utanja 12-25-2012 02:58 PM

Quote:

Originally Posted by teckk (Post 4856643)
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....

utanja 12-25-2012 03:02 PM

[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


All times are GMT -5. The time now is 06:49 PM.