Ngrok Error: 502 Bad Gateway (I can not connect to my IP camera)

When using ngrok by: ngrok http 40 I get and error: “502 Bad Gateway”. This happens when I try to acces my IP camera.

The web page error shows:
Failed to complete tunnel connection
The connection to was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:40.

Make sure that a web service is running on localhost:40 and that it is a valid address.

The error encountered was: dial tcp [::1]:40: connectex: No connection could be made because the target machine actively refused it.

However ngrok works when I access my Blue Iris camera server!

Can anyone guide me on how to access my IP camera using ngrok?. My web service provider does not allow port forwarding, so I need to use ngrok.

Hey @Pancoast – Welcome to the Local Community Forums!

I’m not sure I understand what is trying to be done. Can you elaborate a bit more? Are you using Local for some sort of WordPress development?

I’ve never heard of a WordPress <–> Camera integration, but it sounds interesting!


Thanks for your reply!

Maybe my post is on the wrong forum.

I searched the internet for help with ngrok to access my IP camera remotely. My search led me to “Local Community”. There were other post about Ngrok. So I made a post. However, it did not look correct when I posted it! The name “Local Community” does not give much info for what the forum is about.

I am not sure if this answers your question. Please let me know if I am on the wrong forum.

Thanks for your reply!

No worries! This forum is focused on using Local which is a tool for developing WordPress sites offline.

The reason that it shows up in searches for ngrok tends to be that we used to rely on ngrok for a feature called “Live Links” – which allows you to share a link to the site on your personal machine to anyone across the world, through the internet.

There were limitations to using ngrok, so while we still use it for some things, we are currently building our own site tunnel solution for pro users.

Thanks for the info!

One of these days I plan on getting more familiar with WordPress.


M Hagan

TD: 9dec2020, Wednesday, 12:43 PM EST

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.