Does port forwarding not work on the Duet?
-
Indeed. My standard approach for getting at unsecured services on closed networks is to ssh in to a machine on the network, then use ssh port forwarding to get in to the service. Often I can ssh in to the same machine offering the service, but of course this is not possible with the Duet; I would need a separate SSH host machine. I think there may exist a way to set up a machine that receives HTTPS requests, authenticates them adequately, and then forwards them as plain HTTP to the Duet, but I've never set such a thing up.
-
Yeah, you can set up a reverse proxy with most web servers. I used HAProxy on a Raspberry Pi to add an http auth layer. I haven't set up https yet, but that would be needed for real security.
-
If you have ability to install software you can also try nginx lightweight server to add both HTTPS encryption and HTTP authentication. nginx can also be used to cache static files for faster page open. Easy installation, a lot of configuration examples, small resource usage.
-
To answer the specific question you asked. The Duet itself has nothing to do with port forwarding and can't make it succeed or fail. Port forwarding is done by your router. You are telling your router that, if it gets a message for port 80, then pass it to the local IP address you specify. In this case, the IP address of the Duet. If it doesn't work then it's a router problem or an error in the IP setting.
-
My two cents…
I didn't try port forwarding yet nor a reverse proxy though I have both working for several other services in my LAN.
I don't want to make my Duet public so I relied on my VPN for the two Octoprint instances I had for my printers.
But there must be some kind of issue with the routing in the Duet because my VPN works for everything else but the Duet. It seems the Duet does not recognise the default gateway because my the VPN devices are in a separate subnet and so have to be routed by the firewall. I can call the address, data is going out but no data ever comes back from the Duet to my VPN device... -
I was just going to chime in on this as well. Alex9779 makes a good point, and contrary to what ligumaqua said earlier, for things like VPN access and certain forms of port forwarding to work, the system being accessed (in this case a Duet WiFi) must use an IP stack that supports routing of IP traffic destined to foreign subnets via the default gateway. If the IP stack on the Duet WiFi is limited to local subnet use, only clients on the same subnet will be able to access it.
-
Good point! Agreed.
I was just going to chime in on this as well. Alex9779 makes a good point, and contrary to what ligumaqua said earlier, for things like VPN access and certain forms of port forwarding to work, the system being accessed (in this case a Duet WiFi) must use an IP stack that supports routing of IP traffic destined to foreign subnets via the default gateway. If the IP stack on the Duet WiFi is limited to local subnet use, only clients on the same subnet will be able to access it.
-
Duet has always worked fine with VPN for me.
-
Did anyone had success to access the Duet Wifi from the internet ?
Let me describe again what the goal to achieve is.
Access the Duet wifi (having a private IP address) via the public IP internet over a router.
Normaly this requires a port forwarding rule on the router, something like
forward (external IP port) (Duet wifi external) to (ip of Duet Wifi) port 80
e.g. take 2000 as external IP port and the duet wifi ip address as 192.160.0.100This would allow you to access your Duet Wifi over the internet .
With the duet 0.8.5 this works perfectly, with the duet wifi the connection can not be established.The explanation from W3DRK sounds resaonable, but makes me unhappy
@ tomasf
I think this depends on where your VPN tunnel terminates and what kind of IP address your VPN network card gets assigned. As long as this ip address is in the same subnett as the Duet Wifi is, the explanation from W3DRK is still valid for your and his statement. -
Did anyone had success to access the Duet Wifi from the internet ?
Let me describe again what the goal to achieve is.
Access the Duet wifi (having a private IP address) via the public IP internet over a router.
Normaly this requires a port forwarding rule on the router, something like
forward (external IP port) (Duet wifi external) to (ip of Duet Wifi) port 80
e.g. take 2000 as external IP port and the duet wifi ip address as 192.160.0.100This would allow you to access your Duet Wifi over the internet .
With the duet 0.8.5 this works perfectly, with the duet wifi the connection can not be established.In case this is still a question, I can confirm this does work just like it does for my Duet 0.6. I finally got my new printer up and running today with duet wifi, I setup port forwarding as test and confirmed it could be accessed externally via public IP.
running 1.18beta firmware, 1.14a dwc and 1.03 wifi server.