How to access router GUI from FreeNAS

Status
Not open for further replies.

phil5

Cadet
Joined
Jul 4, 2018
Messages
3
Hi,

I have a simple home network: router -> freenas, other devices.

I currently manage freenas remotely by ssh and tunneling with PuTTY. I would like to access the remote router's GUI to change some settings. I can ping it from freenas... but I'm not sure how to relay a connection to access the GUI in my browser, remotely.

Thanks
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

phil5

Cadet
Joined
Jul 4, 2018
Messages
3
Please share full hardware details of your configuration per the forum rules:
https://forums.freenas.org/index.php?threads/updated-forum-rules-4-11-17.45124/

Basically, it's old hardware running FreeNAS-9.3-STABLE-201605170422 on 4GB of ram.

You have somehow configured FreeNAS as a bridge to pass traffic in one network port and out the other?
/

SSH service is enabled on Freenas and the port is forwarded from the router. I access the Freenas management GUI by tunneling the https port. This works fine.

Now I want to access the router's GUI. Like I said, I can interact with the router from Freenas (with PuTTY's terminal emulator), but I'm not sure how to access the GUI.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
This really has nothing to do with FreeNAS. If you want an SSH tunnel to your router then set one up and run it.

Personally it sounds like you'd be better off with a VPN set up.
 

phil5

Cadet
Joined
Jul 4, 2018
Messages
3
This really has nothing to do with FreeNAS. If you want an SSH tunnel to your router then set one up and run it.

That's what I'm asking... how, from the Freenas shell? And how do I link it to the other tunnel?

You're right, It is a general question.

Personally it sounds like you'd be better off with a VPN set up.

I agree, in fact that's precisely what I'm attempting to do: gain access to the router's GUI to enable VPN.

I will have physical access to the network in a few weeks, so it's not the end of the world if I don't find an answer. However, I thought this would be more straightforward.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You need to forward the router's GUI port back to your local desktop / laptop. It can be tricky to have
2 hop forwards. I've done it.

It's probable that you can't get to the router's GUI from the Internet, as that would be a security flaw.
So, you SSH into the FreeNAS, (or other host internal to your remote LAN), then tell it to forward the
router GUI port back.

I don't know how to setup PuTTY to do it, (though it's likely you CAN do it through PuTTY). But SSH
command line would be something like this;

ssh -N -L 443:MY_ROUTER:443 -L 80:MY_ROUTER:80 MY_FREENAS
  • Replace MY_ROUTER with it's internal IP, (for example 192.168.0.1, which is commonly used).
    Remember, unless the FreeNAS has an "/etc/hosts" entry for the router, the NAS likely won't find
    the router by name.
  • Replace MY_FREENAS with your FreeNAS' name or IP.
  • Add or remove "-L" instances as appropriate for your router's GUI TCP/IP ports. Common ports
    80 & 443 are shown.
  • Open a browser against your localhost, 127.0.0.1, on the appropriate TCP port.
Last, this assumes you are not using TCP ports 80 and or 443 on your desktop or laptop. If you are, then
you would not be able to use them for your port forwarding. You may have to do something like this instead;

ssh -N -L 80443:MY_ROUTER:443 -L 8080:MY_ROUTER:80 MY_FREENAS

Good luck.

P.S. I won't be able to help with PuTTY configuration, I simply don't use PuTTY enough to understand it's
port forwarding features.
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
The PuTTY equivalents of what Arwen posted:

PuTTY - Connection | SSH | Tunnels

You will probably only need one of these:

Source port: 80 (or 8080) or 443 (or 80443)
Destination: RouterIP:80 or RouterIP:443
Leave other options alone and click Add

Now you can connect to your router at one of these depending on how you configured:
127.0.0.1:80 (or whatever source port you chose from above) If using 80443, don't forget the https prefix since the browser won't know it is TLS.

Your PuTTY Session Host Name is of course still your FreeNAS server.

Edit: You are tunneling TCP in TCP so don't expect spectacular performance, F5 may become a close friend.
 
Joined
Dec 29, 2014
Messages
1,135
I have no idea if it is still around, but there used to be a text based browser called lynx. If that could be loaded on FreeNAS and the router GUI was usable through that interface, that would be possible. That said, this is more of a network infrastructure thing than a FreeNAS thing. All IMHO, off course. You can use a hammer to drive in a Phillips screw, but it might not be the right tool for the job... :smile:
 
Status
Not open for further replies.
Top