Connecting to FreeNAS Machine Anywhere?

Status
Not open for further replies.

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
Sounds to me like finish port should be 22 if you havent messed with the FreeNAS ssh port settings.

INBOUND (17222) -> INTERNAL(22)

your port showed closed because you were forwarding 17222 to 17222...you need to forward it to 22

This is basic networking here. It is really easy.
Yes, basic, but, I've never had this much trouble (I used to run a private server for a game...)
the start port has to be lower than the finish port though?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Sounds to me like finish port should be 22 if you havent messed with the FreeNAS ssh port settings.

INBOUND (17222) -> INTERNAL(22)

your port showed closed because you were forwarding 17222 to 17222...you need to forward it to 22

This is basic networking here. It is really easy.
I think the finish port is actually referring to a range of ports.
My old linksys router, for example, did not support forwarding to a different port.
It did, however, support port range forwarding, so it had a start and finish fields so you could forward 10 ports at once (ie. 1000-1010).
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Yes, basic, but, I've never had this much trouble (I used to run a private server for a game...)
the start port has to be lower than the finish port though?
The fact that he says the start port needs to be lower confirms it. It's referring to a range of ports, not port remapping.

What is the make/model of your router. It would be a lot easier for us to help you if you tell us that information so we can pull up a sample image of your router admin page.
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
It's a NetGear DGN-1000 N150
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
If it's anything to say
I have ports already forwarded to allown an open NAT for Black Ops 2 on my PS3 (Example: 3074-3074 and 27000-27050)
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Ok, after a quick skimming of the manuals, it doesn't look like your router supports remapping, so you would need to make a choice to either use 22 or configure SSH to run on a different port.
Either way, you would need to add a custom service in "Security -> Services" page.
Name it whatever you like, configure it for TCP type with start and finish port of whatever port you choose (22 or 17222).
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
ANd than over in FreeNAS the SSH Port would be set to (17222) as an example?
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
It seems that really no matter what I do the ports aren't open and they keep timing out...
Error: I could not see your service on122.149.246.240 on port (22022)
Reason: Connection timed out

Using CanYouSeeMe
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Correct. You would go to the NAS gui page and change it there under Services -> SSH.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
If it's not getting through, it's because your router is not configured properly. Did you make sure the service is forwarded to the correct IP? (Your NAS IP)
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
It looks like after adding the custom service I mentioned, you also still need to make an inbound rule after that that maps to that custom service you just created.

So, you would add an inbound rule with the name of the custom service you just created.
Allow always action.
Send to LAN server (IP of your NAS).
WAN Users: You can either put Any here or if you just want to restrict it to whatever IP (your work IP for example), you can also specify it here.
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
So I just looked over at the NAS machine, and instead of saying the usual "You can try connect using: http://192.168.0.2" <- used to... it came up with, "You can try connect using: http://192.168.0.2:17222" <- Though i've changed it all in the router now to 22022...and using that: 192.168.0.2:22022 presents itself with
Code:
SSH-2.0-OpenSSH_6.2_hpn13v11 FreeBSD-20130515
Protocol mismatch.

So...that's a little itneresting (I'm giving the machine a restart...)
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
Did you make sure the service is forwarded to the correct IP? (Your NAS IP)
^ explain this part, how can I make sure that it is right?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
So I just looked over at the NAS machine, and instead of saying the usual "You can try connect using: http://192.168.0.2" <- used to... it came up with, "You can try connect using: http://192.168.0.2:17222" <- Though i've changed it all in the router now to 22022...and using that: 192.168.0.2:22022 presents itself with
Code:
SSH-2.0-OpenSSH_6.2_hpn13v11 FreeBSD-20130515
Protocol mismatch.

So...that's a little itneresting (I'm giving the machine a restart...)

This sounds like to me that the port you changed was NOT the SSH port, but rather your admin GUI page... which is the web server daemon.
In that case, the "protocol mismatch" makes perfect sense since you're trying to connect to a web server through the SSH protocol.

Regarding the NAS IP, look at the post above I edited about inbound rules.
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
^ that's correct, I just realised, I had it set to HTTPS on the IPv4: 192.168.0.2(My NAS IP) with the Port of 17222, I'm going to take that off...
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
Alright followed what you said about the INBOUND rule, and, the port is still closed...
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Did you change the port your SSH runs on FreeNAS by going to Services -> SSH and changing that TCP Port field?
Once you do that, you also want to make sure you restart the daemon (ie. put the button to "off" position and then putting it back to "on".
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
ALright, I restarted it, now what? open PuTTy and try connect to my external ip on 22022?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
First of all, I would try it locally first to ensure you can indeed connect locally through that port. Once you've confirmed that you can do so, then you connect from the outside world.

Keep in mind, that simply using your external IP may not necessarily work from your local network because most consumer-grade routers do not support a feature called NAT loopback.
If your router does not support it, then you can only test the connectivity by connecting from a true external network.
 

Brent

Explorer
Joined
Aug 17, 2013
Messages
60
I can connect using 192.168.0.2:22022 using putty
 
Status
Not open for further replies.
Top