Configuring Remote SSH

So yesterday I attempted to set up remote ssh for my openSUSE server so that I could access my documents while at school, at a friends home, etc. So I started with configuring sshd to be secure, after which I allowed the port I chose in iptables. Testing the ssh connection from a local host was fine so that confirmed that the iptables rules were working and packets were not getting dropped/rejected. Then of course I had to do some port forwarding on the router so that it forwarded all packets for the ssh port to my server. This seemed fine but when I attempted to ssh from my schools servers, I was unable to. So I ran wireshark on my server to attempt to see if the packets even arrived and they did not. This meant that something in between my server and the schools servers was dropping the packets. I ran a trace route and got results similar to this:

~> /usr/sbin/traceroute my_external_ip
traceroute to my_external_ip, 30 hops max, 40 byte packets using UDP
1 matrix-lvs1.matrix (192.168.1.101) 0.226 ms 0.167 ms 0.177 ms
2 142.204.140.66 (142.204.140.66) 95.424 ms 96.687 ms *
3 142.204.9.33 (142.204.9.33) 1.194 ms 1.103 ms 1.066 ms
4 142.204.43.200 (142.204.43.200) 1.141 ms 1.050 ms 0.880 ms
5 york-hub-seneca-if-re.gtanet.ca (205.211.95.153) 1.791 ms 1.814 ms 2.130 ms
6 ORION-GTANET-RNE.DIST2-TORO.IP.orion.on.ca (66.97.23.125) 2.602 ms 1.825 ms 1.239 ms
7 be202.gw01-toro.orion.on.ca (66.97.16.26) 2.176 ms 1.967 ms 2.455 ms
8 gw-isp.torontointernetxchange.net (206.108.34.121) 2.211 ms 2.131 ms 1.892 ms
9 38.111.102.71 (38.111.102.71) 2.818 ms 2.532 ms 3.423 ms
10 isp_ip 3.866 ms 3.790 ms 3.430 ms
11 * * *
...
30 * * *

With this I went asking on my ISPs forums as to why the connection was stopping there, and the answer I was given embarrassed me quite a bit. As it turns out the modem the ISP provides is also a router so the packets were all being dropped there as it was not configured to forward anything. So, I opened up the modems configuration page, set up forwarding and now all is well. I can successfully ssh into the server from outside the local network.

Advertisements
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s