Multiple port forwarding


#1

What is the problem?
Trying to figure out how to use octoprint remotely from anywhere with 2 printers?

What did you already try to solve it?
I have on raspberry pi 3 with 2 octoprint setups I can access both from the house but remotely I can only be hooked to one or the other ho do I use both at the same time thank you everyone in advance.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)


#2

You haven't provided nearly enough information for anyone to help. Start with examples of how you access both from the house (i.e. the URLs that you use). You might give some details of how you got two OctoPrint setups running on the same Pi.

To access internal URLs or ports remotely, your internet router / firewall needs to be configured to do port forwarding. Most routers can map different external ports to the same or different internal addresses and ports. The more details you provide about what router and what you have configured that does work, the better chance you will have of getting someone here to help.


#3

I am using a arris model# nvg468mq. Ok starting from the beginning I programmed a raspberry pi with Octoprint and then did the port forwarding from this video https://youtu.be/jUX_sc5B9hw everything was great and worked flawlessly. BUT then I decided to get a second printer and needed to control it remotely also so I added separate instances of octoprint to the same original raspberry from this video https://youtu.be/7Saa1HpLRoM as long as I was in network it worked great but if I accessed out of network I would have to disconnect and reconnect to the second printer but if I was already printing on the first it would kill the print vise versa from there I got a second raspberry pi and put octoprint on there and tried to do the port forwarding but this is where it’s not working it won’t let me use the same port 80. I don’t know if I’m missing a step or what but it’s driving me nuts


#4

i did not watch the whole video.. but it looks like the guy did use 2 Ports 5000 and 5001
So, you also need to forward 5000 and 5001 thru your router.


#5

And obviously access octoprint directly over the :5000 or :5001 ports instead of port 80


#6

If both instances are running on the same Pi I'd simply put them both behind the same reverse proxy on the same Pi and use one port forward.

(And add HTTP basic auth to the reverse proxy for additional security. Or better yet use a VPN.)


#7

You seem to be adverse to providing "text" examples. I don't want to watch 45 minutes of video to learn how it should be done, I want you to provide us with the "condensed" results of how you did it. Specifically, what works and what doesn't and when it doesn't work, detailed error messages (if any) or a "text" description of what appears to be wrong.

For example, if I had set things up like those two videos, I would access both printers from my internal browser with "http://octopi:5000" and "http://octopi:5001". I would verify that both printers can be accessed simultaneously from two tabs on my browser, and that both printers can be printing at the same time.

Then, I would go to my router and add two port forwards, 5000 to 5000 and 5001 to 5001. I would verify that every Tom, Dick, and Harry could access my printer from any internet cafe in the world. I would then "freak out" and make sure I had some sort of access control so only I could connect from an internet cafe and Tom, Dick and Harry were at least forced to guess a username and password before accessing my printers.

I, in fact, do have internet access to my printer but I did so by setting up OpenVPN on my router. This provides the same protection as your online bank provides for your money.

I can also tell you that yesterday my firewall denied access to over 2,000 attempts, 23% from Russia and 11% from China. With a public IP address comes responsibility!