Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Does port forwarding not work on the Duet?

    Scheduled Pinned Locked Moved
    General Discussion
    9
    14
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sLpFhaWKundefined
      sLpFhaWK
      last edited by

      I have had multiple Octoprint instances running my house on my router with port forwarding set to work outside when I want to monitor at work etc, but whenever I try to set a rule for the Duet Wifi's it always refuses the connection.

      It just came to me as I was writing this, but is it because I don't have a password set in the config.g? I know I saw it somewhere but I forget how to set one.. Time to go look at the Faq!

      -sLpFhaWK
      Ultibots K250v
      Rostock Max v2 Soon to be Full MetalMax
      Mini Kossel

      1 Reply Last reply Reply Quote 0
      • sLpFhaWKundefined
        sLpFhaWK
        last edited by

        Okay I added a PW and it still refuses to connect.

        -sLpFhaWK
        Ultibots K250v
        Rostock Max v2 Soon to be Full MetalMax
        Mini Kossel

        1 Reply Last reply Reply Quote 0
        • peridotundefined
          peridot
          last edited by

          The g-code network configuration only does anything for non-WiFi Duets.

          I'm not sure exactly what kind of port forwarding you're trying to do, but there have been posts on the forum discussing how to make a Duet WiFi accessible from the outside world.

          1 Reply Last reply Reply Quote 0
          • tomasfundefined
            tomasf
            last edited by

            I wouldn't recommend exposing a Duet to the internet without something in between that adds (proper) authentication and preferably encryption.

            1 Reply Last reply Reply Quote 0
            • peridotundefined
              peridot
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • tomasfundefined
                tomasf
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • roboduetundefined
                  roboduet
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • lignumaquaundefined
                    lignumaqua
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • Alex9779undefined
                      Alex9779
                      last edited by

                      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...

                      1 Reply Last reply Reply Quote 0
                      • W3DRKundefined
                        W3DRK
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • lignumaquaundefined
                          lignumaqua
                          last edited by

                          Good point! Agreed.

                          @W3DRK:

                          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.

                          1 Reply Last reply Reply Quote 0
                          • tomasfundefined
                            tomasf
                            last edited by

                            Duet has always worked fine with VPN for me.

                            1 Reply Last reply Reply Quote 0
                            • Pumluxundefined
                              Pumlux
                              last edited by

                              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.100

                              This 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.

                              Using a own build of a Mendel Max , Duet Wifi, Bed 8 mm Aluminium PEI 500 x 280 x 400 230 V 850 W, original E3D Chimera hotend with bowden length 700 mm, since short time with a BL-Touch, Steppers : mostly Nema 17 and one Nema 23 for Y-axis

                              1 Reply Last reply Reply Quote 0
                              • Crash69undefined
                                Crash69
                                last edited by

                                @Pumlux:

                                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.100

                                This 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.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA