Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-21-2012, 06:07 PM
|
#1
|
LQ Newbie
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4
Rep:
|
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?
|
|
|
12-21-2012, 10:54 PM
|
#2
|
Member
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196
Rep:
|
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.
|
12-22-2012, 09:06 AM
|
#3
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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 09:08 AM.
|
|
1 members found this post helpful.
|
12-22-2012, 12:21 PM
|
#4
|
LQ Newbie
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4
Original Poster
Rep:
|
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:-)
|
|
|
12-25-2012, 01:57 AM
|
#5
|
LQ Newbie
Registered: Jan 2009
Distribution: Simply Mepis
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
12-25-2012, 08:07 AM
|
#6
|
Member
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643
Rep:
|
Quote:
Originally Posted by Volofrog
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...
|
|
|
12-25-2012, 01:38 PM
|
#7
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,359
|
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?
|
|
|
12-25-2012, 03:58 PM
|
#8
|
Member
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643
Rep:
|
Quote:
Originally Posted by teckk
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....
|
|
|
12-25-2012, 04:02 PM
|
#9
|
Member
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643
Rep:
|
[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 12:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|