Any Network Experts Out There? (Port Forwarding) (1 Viewer)

FullMonte

Super Forum Fanatic
Joined
Dec 23, 2002
Messages
6,126
Reaction score
4,284
Age
56
Location
Shreveport/Bossier City
Offline
I'm having an issue regarding port forwarding, and I was wondering if someone can help me out.

Here's my setup. I've got a cable modem->Nighthawk Router->16 port switch->Raspberry Pi. The Pi is running Octoprint to control a 3d printer. I am trying to access the Octoprint server from outside of my local network.

--The Pi has an IP reservation of 192.168.1.4 on my Router
--The Router is set up for remote management at XXX.XXX.XXX.93, port 8443 (the IP address is reported on the remote management tab of my router's setup screen)
--I have set up 192.168.1.4 for port forwarding, using port number 25000, with Both (TDP/UDP) selected as protocols.

When connected to my local network, if I go to 192.168.1.4 using a web browser, the Octoprint server opens up, and I can control my 3d printer.

When connected to another network, if I go to XXX.XXX.XXX.93:25000 using a web browser, it tells me that it cannot connect to the server, that the server timed out.
When connected to another network, if I go to XXX.XXX.XXX.93:8443, it allows me to log into my router and view/change the settings.

Any suggestions?
 
When you say "another network", are trying to connect over the Internet? Also, the remote management IP is not the IP you would connect to.

Octoprint has an article on remotely accessing the service safely.


You can even install something like Teamviewer on a Windows computer, which would allow you to remotely manage this from outside the network. Just make sure you use a unique password with Two Factor Authentication (2FA) enabled.

Nowadays, I wouldn't recommend any home users forward ports directly to application services over the Internet unless they are using a VPN and know what they are doing. If you are confused by port forwarding, find another method. Doing it wrong is a good way to get your network compromised.
 
Last edited:
When you say "another network", are trying to connect over the Internet? Also, the remote management IP is not the IP you would connect to.

Yes, I am connecting over the internet. As far as the IP, the IP that is used for remote management is the same IP that "what's my ip" reports for my connection. That's the IP that all of the tutorials on how to use port forwarding to access Octoprint say to use. I mentioned remote access mainly to show that I'm able to access that port on my router (8443) from the internet.

Nowadays, I wouldn't recommend any home users forward ports directly to application services over the Internet unless they are using a VPN and know what they are doing. If you are confused by port forwarding, find another method. Doing it wrong is a good way to get your network compromised.

I was planning on using a VPN as my long term solution. This was, at the present, more of a learning experience. I understand the theory behind port-forwarding, and I've done everything that every tutorial/example on the subject says to do, but it doesn't seem to connect. I was hoping to find out why so I could grasp what (if anything) I did incorrectly.
 
Yes, I am connecting over the internet. As far as the IP, the IP that is used for remote management is the same IP that "what's my ip" reports for my connection. That's the IP that all of the tutorials on how to use port forwarding to access Octoprint say to use. I mentioned remote access mainly to show that I'm able to access that port on my router (8443) from the internet.

You are referring to your public or WAN IP address. Yes, that is the address that you would connect to. If you set things up correctly by forwarding Public_IP:25000 to Raspberry_IP:80 (or 443 or some custom port), then it should work. Again, it's not wise to do this over the Internet, especially with the security issues Netgear has had lately. Look into the alternatives I mentioned.

Edit: Of course, I'm just some guy on the Internet. You don't have to listen to my advice. If you are still looking to do this, then make sure you set up Access Controls to only allow the public IP address that you will be connecting from to access the public IP on your home router. This should give you some level of protection.

 
Last edited:
Are you sure you're forwarding port 25000 to whatever port your Octoprint server is listening on? Like Chris above said, you probably need to forward port 25000 to tcp 80 or tcp 443.
 
I tried several things, and nothing would work.

So, then I tried installing PiVPN on the same Pi as my Octoprint install, since it's one of the recommended VPNs on their blog post (mentioned above). It would not install correctly. I wiped the SD card and reinstalled everything multiple times, and it would never work.

Finally, I took a second Pi I had, and installed the Raspian OS on it, and installed PiVPN, and it works perfectly. I was able to forward the correct port to the Pi for the VPN server and was able to created the key for my clients.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Users who are viewing this thread

    Back
    Top Bottom