Cannot Establish SSH (SFTP) Over WAN

Status
Not open for further replies.

scottroberts6

Dabbler
Joined
Apr 26, 2013
Messages
11
Hello,

I have a FreeNAS 8.3.0-RELEASE system which has been up and running for several months without issue, which is supplying a few TB of data to 5-10 users over CIFS for a small office. One of our employees will be working remotely for several weeks and would like to access files from the server from time to time. In order to accommodate this need I setup SSH on the server and created a user account for him to authenticate.

Locally, this works great - I can punch in the IP address (192.168.0.25) of the server as such:
sftp://192.168.0.25
Using FileZilla, this works excellent, the user authenticates (& fails without correct credentials).

I then setup a "Virtual Server" on our DLINK router, which enables an specific external port to be forwarded to a (different) internal port and specific IP address.
i.e. WAN TCP packets on port 45678 >> forwards to LAN 192.168.0.25:22

I tested this setup using the "SSFTP" client on a Windows machine using this site:
http://www.infobyip.com/sshservertest.php
The server tester was able to connect to my test SSH server immediately.

However, when I adjust the configuration to point to my FreeNAS box instead of the Windows machine (on which the SSFTP program has been shut down) the external server is unable to establish any connection what-so-ever (connection timeout). I also attempted configuring old-school "port forwarding" of port 22 to the FreeNAS box with no success. The FreeNAS box seems to be either (1) isolated from the external network somehow, or (2) ignoring all requests from non-LAN machines.

I have exhausted my troubleshooting abilities and I am fairly certain that the problem lies in my FreeNAS box and/or my internal network configuration. Is there a way to see whether or not the connection is making its way to the FreeNAS box (and being ignored/refused)?

Currently the one and only ethernet connection attached to the FreeNAS box is configured as such:

IPv4 Address: 192.168.0.025
IPv4 Netmask: /24 (255.255.255.0)
IPv6 off
No aliases or options configured

I double checked my Windows machine (to which I was able to connect) and it has the same netmask.

Please advise me how to proceed... I greatly appreciate it!
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Did you assign a default gateway? Check it with "netstat -rn" or just try pinging google.com from the shell.
 

scottroberts6

Dabbler
Joined
Apr 26, 2013
Messages
11
As it turns out I had not set a default gateway, and after setting that everything works perfectly!

Thanks for the suggestion gpsguy! I really need to read a book or two on networking.
 
Joined
Feb 1, 2014
Messages
1
I am having the same problem, but I have a default gateway assigned and when I try to pinging www.google.com, I recieve the following message:
"ping: cannot resolve www.google.com: Host name lookup failure"

I am new at working with FreeNAS, so I don't know how to proceed. What can I do about it?
 

BTW

Dabbler
Joined
Feb 1, 2014
Messages
33
It sounds like you have a DNS issue (misconfiguration or not available....my first guesses).

  • Set DNS for your system
    • If you are on the console of FreeNAS
      • Choose option 6 (Configure DNS)
        • You can use an internal one or a public one
          • Suggestions: google's = 8.8.8.8 or Level3 = 4.2.2.2
    • If you are in the GUI
      • Network > Global Configuration
        • Under "Nameserver1" enter your DNS IP address
  • Confirmation
    • From the shell (via the console option 9 or GUI > shell)
      • type
      • Code:
        ping 8.8.8.8
    • You should receive something like:
    • Code:
      Pinging google-public-dns-a.google.com [8.8.8.8] with 32 bytes of data:
      Reply from 8.8.8.8: bytes=32 time=38ms TTL=47
      Reply from 8.8.8.8: bytes=32 time=40ms TTL=47
      Reply from 8.8.8.8: bytes=32 time=40ms TTL=47
      Reply from 8.8.8.8: bytes=32 time=37ms TTL=47
If not, then you have a network issue (bad IP addresses, routing, or firewall blocking) that is preventing your system reaching the Internet.
 
Status
Not open for further replies.
Top