SSH with different subnets

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?
TimByrAsked:
Who is Participating?
 
TimByrAuthor Commented:
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
 
ahoffmannCommented:
> 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
 
TimByrAuthor Commented:
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
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
ahoffmannCommented:
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
 
TimByrAuthor Commented:
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
 
ahoffmannCommented:
> Is that helpful?
unfortunatelly no, as the router (most likely 1.2.3.1) is the key point
0
 
TimByrAuthor Commented:
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
 
ahoffmannCommented:
what do you get for

  traceroute external-IP-or-hostname
0
 
TimByrAuthor Commented:
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
 
ahoffmannCommented:
then you have to check what happens on 1.2.3.126  
0
 
TimByrAuthor Commented:
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
 
ahoffmannCommented:
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
 
TimByrAuthor Commented:
So the problem is between the internal ip of the router and the external ip of the router?
0
 
ahoffmannCommented:
hmm, the router is the problem as I said in http:#23663383 and http:#23664255
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.