question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Opendatacam reachable behind NAT

See original GitHub issue

Thank you for the logs. I have a theory why Opendatacam is not handling your NAT setup correctly. I believe what happens is the following:

  1. Opendatacam listens on any IP address/hostname for incoming connections on Port 8080.
  2. The first client connecting to <odc>:8080/ or <odc>:8080/start starts the Darknet process (see server.js)
  3. Opendatacam then tries to connect to Darknet using the <odc> IP address/hostname from your browser (see Opendatacam.js). This works fine unless you use NAT.
  4. Because now Opendatacam tries to connect to Darknet on your public IP/hostname ports 8070 and 8090. However as there are no port forwarding rules setup, the connection will fail.

Therefore, to fix this you we have two options:

  1. Setup port forwarding for 8070 and 8090 (not preferred)
  2. Fix the Darknet hostname in https://github.com/opendatacam/opendatacam/blob/development/server/Opendatacam.js#L792 and https://github.com/opendatacam/opendatacam/blob/development/server.js#L188 to localhost

_Originally posted by @vsaw in https://github.com/opendatacam/opendatacam/issues/373#issuecomment-779727816_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
zeljkomarinkoviccommented, Apr 20, 2021

It was my fault, tried to install curl on that machine and somehow screwed up mongod.services (i think libcurl is culprit there). Reinstalled mongodb and works just fine. Sorry for all trouble i caused and not checking obvious first

edit:https://askubuntu.com/questions/1063003/how-can-i-install-both-curl-depending-on-libcurl4-and-mongodb-depending-on-li

0reactions
vsawcommented, Feb 14, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Not working from external IP · Issue #373 · opendatacam ...
I'am trying to access OpenDataCam from external IP (4G or even LAN through a router) Here is ... Make Opendatacam reachable behind NAT...
Read more >
How can my IP camera be hacked behind a NAT?
It is possible that the camera is still reachable from the network, even if UPnP, port forward is disabled, and the camera is...
Read more >
Is it possible to host a web server from behind a NAT
It is feasible to host a server behind NAT as you describe. Look at this Ubuntu help page on ServersBehindNAT for basics. Some...
Read more >
️ Customize OpenDataCam - GitHub Pages
Customize OpenDataCam. We offer several customization options: Video input: run from a file, change webcam resolution, change camera type (raspberry cam, ...
Read more >
Real-time traffic quantization using a mini edge artificial ...
A collection of real-time inference from the OpenDataCam browser-based interface. The limitation of only two vehicle classes provides limited granularity ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found