[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SSH with different subnets

Posted on 2009-02-17
14
Medium Priority
?
878 Views
Last Modified: 2013-12-23
I am trying to login to a remote SSH server but it fails to connect.
However It connects locally when using the external IP or hostname so the router is correctly configured to forward port 22.

The only thing I can think of is that the external IP address of the router is on has a different subnet from the internal network.

Would this be the problem? Or am I missign something elsewhere? Or if this is the case, how can I configure my SSH client to connect to it?
0
Comment
Question by:TimByr
  • 7
  • 7
14 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23662885
> However It connects locally when using the external IP or hostname so the router is correctly configured
How did you prove that?
You may check the routing with traceroute or tracert, from both locations and compare the hops you see (assuming that your firewall allows that).
0
 

Author Comment

by:TimByr
ID: 23663004
Surely if I make a request to the WAN address of the router from within the local network it is still treat as an external conenction?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23663106
again: how do you prove that?

> .. from within the local network it is still treat as an external conenction?
depends on the configuration of your internal router and/or firewall
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:TimByr
ID: 23663309
My Routing Table Entry List

0.0.0.0        0.0.0.0        1.2.3.1        WAN (Internet)
1.2.3.0       255.255.255.128       1.2.3.126       WAN (Internet)
192.168.1.0       255.255.255.0       192.168.1.1       LAN & Wireless

Is that helpful?

Unfortunately I don't have physical access to the server, but I have access to the router. But as far as I remember that router would not allow you to connect via the WAN address from the local network unless the correct ports were forwarded. But I'll have to double check.

I have also looked at a few online guides about setting up my specific router for ssh connections and I have done what they have said to do.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23663383
> Is that helpful?
unfortunatelly no, as the router (most likely 1.2.3.1) is the key point
0
 

Author Comment

by:TimByr
ID: 23663412
Sorry I should have been more clear.

1.2.3.1 is the gateway of the ISP
1.2.3.126 is the WAN address
255.255.255.128 is the subnet mask
192.168.1.1 is the internal router address
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23664022
what do you get for

  traceroute external-IP-or-hostname
0
 

Author Comment

by:TimByr
ID: 23664172
Tracing route to "hostname" over a maximum of 30 hops:
1   2ms 2ms 1ms  "the external ip"
Trace Complete.

I just tested trying to ssh locally using the external ip without the port foward and the connection was refused.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23664255
then you have to check what happens on 1.2.3.126  
0
 

Author Comment

by:TimByr
ID: 23664408
How would you suggest doing that? The log system on my router is terrible. It needs to manually refreshed to view the current connections.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 23664465
hmm, my crystal ball doesn't say anything about your router, sorry
I assume that the problem is the routing between 1.2.3.1 and 1.2.3.126
0
 

Author Comment

by:TimByr
ID: 23664523
So the problem is between the internal ip of the router and the external ip of the router?
0
 

Accepted Solution

by:
TimByr earned 0 total points
ID: 25790811
The brand of router I use appears to block port 22 from external access and ignores configuration such as DMZ and portforwarding in regards to this port.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 25793561
hmm, the router is the problem as I said in http:#23663383 and http:#23664255
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question