Correct. By definition, this is insecure. It's not so much an OctoPrint thing as it is a your-router thing. It's your router's job to act as a firewall and to block incoming traffic that's not a response to something inside.
No offence but if you don't have the skill to figure out why you can't connect to your printer while you're connected to a different network you really shouldn't make things like your 3D printer public available on the internet.
Again no offence. I'm just worried about your safety.
No. Port forwarding makes your printer available to anyone on the Internet and that's bad. Now also install client certificates, as described on this forum.
I have port forwarding over 15 years for security cameras.
I never hear of any of these things.
I know if hackers looking for you it doesn't need port forwarding, it will come to you in every way.
Well, you might not have heard of any fallout from port-forwarding, but the dark side of the Internet knows about this. There are websites which have databases of people whose computers are available like this to them. In simple cases, they sell the information to make money. In more advanced cases, they themselves try to do anything to make money from your foolishness. The easiest way is to then push code to your computer to turn it into something like a computer-jinni which does their bidding. And then you find that your ISP has turned off your account because it's been responsible for sending out millions of SPAM emails, for example.
You need to determine why you want to remotely access OctoPrint. Make a list of specific activities you wish to do remotely. Some of the items on the list will have ways to safely access them remotely. Some of the items on the list will be dangerous to allow.
Without some protection you are at risk of having your local network turned into their launching pad. If you have any sensitive data on your local network they will probably have a copy of it.
I set up my Raspberry Pi 3B (EDIT: not a 3B+, thanks Amazon) yesterday with OctoPi 0.17.0 (the version advertised on the front page). Using a keyboard and monitor I can see that it works, but the line about accessing it over the network is blank, and the address "octopi.local" is blank on my computer and mobile. I followed the setup guide, uncommenting the WPA2 section and entering my credentials (first for my 5GHz network, then for my 2GHz network), and also tried moving the country code before the network details.
Then, I entered my mobile's hotspot credentials to the wpa supplicant txt file, and success! I could visit octopi.local on my mobile (and on my computer when I moved it over to the hotspot). So, what could possibly make the OctoPi's wifi work with a mobile hotspot but not with a home router?
Additional details:
PC: Windows 10.
Mobile: Pixel 4 on Verizon.
Router: NETGEAR Nighthawk R7000.
Raspberry Pi: 3 Model B v1.2.
OctoPi: 0.17.0.
Country: US.
Troubleshooting steps:
Moved my Pi to within a foot of the router to eliminate signal strength.
Reflashed image (using baelnaEtcher and NotePad++).
Ran "ifconfig wlan0" several times to confirm wlan0 is up. Always reports "ether" not "inet".
Ran "iwlist wlan0 scan" to confirm it can see SSID(s). Sometimes it can see networks (including my 2GHz), sometimes "interface doesn't support scanning : Network is down". Sometimes, if it is down, "sudo ifconfig wlan0 up" followed by scan works to produce a list of SSIDs. In the most recent attempt, my 2.4GHz network is "Cell 02".
I re-flashed it again (that's fresh start #3) and configured the wpa file for my mobile hotspot. Once that was connected, I commanded an update and upgrade. After that, it was able to connect to my home network. Octoprint is now up and running on my printer. If this is a known issue with the dot-zero version, perhaps a dot-one needs to be released...
Got a strange issue I can't wrap my head arround.
I'm trying to connect my Raspi to a GoPro camera. Which I occationally manage to do..
But I can't get the Pi to disconnect from the first Wifi I connected it to..
I've changed the wifi settings both in octopi-wpa-supplicant.txt and by "sudo raspi-config" several times. I've tried setting it to the GoPro's Wifi details, and it sometimes work. But it only lasts for minutes.
What i found, is that the Pi connects to my router's wifi even if these details are completely removed from octopi-wpa-supplicant.txt. So after configuring octopi-wpa-supplicant.txt or using the raspi-config thing to connect to the GoPro's Wifi, I can still SSH from my Mac with the ethernet cable unplugged.... ?? (and I can see in my routers web interface that the Pi is connected via Wifi.
Some details:
-I'm on a mac.
-I'm as much of a beginner as one can possibly be.
-After using raspi-config to input a text phrase ("doesthiswork") instead of a real SSID, I selected "finish", did a reboot, and octopi-wpa-supplicant.txt does not update with "doesthiswork" as SSID. Where does raspi-config store the Wifi settings that I input?
Most people in here are heaving issues connecting... I can't disconnect
If you're attempting to circumvent the /boot/octopi-wpa-supplicant.txt file by using sudo raspi-config, then it's probably a good idea to rename the version on the boot partition.
You might do this on the Pi after you've successfully logged in. Then visit the raspi-config utility, set the values again and reboot.
What was likely happening is that you were using raspi-config, making changes and those changes were going straight to some file like /etc/wpa_supplicant.conf or similar. Then upon bootup, another routine was seeing the octopi-wpa-supplicant.txt and pushing these values into that same global configuration file (overwriting your attempts).