The current setup I have for the Raspberry Pi is:

USB Webcam -> Raspberry Pi -> Netgear Router -> Local ISP -> Internet

My ISP gives me a captive portal through which I can login to access the internet and my public IP address is shown something like 203.xxx.xx.xx, when I try to access this IP from the browser, I am taken to the ISP's Captive Portal Page and not allowed to access anything further.

There are many other people connected to the same ISP and they are given the same IP too (obviously).

The ISP is not ready to allot a dedicated IP or open up any ports for me so that I can configure my Netgear router to forward ports etc.


I have installed motion on my Pi and I can access it via via my local lan i.e inside my Netgear Router Network. How can I access from outside my Network i.e from a remote location like my office.

I would not like to use third party software like teamviewer to relay my whole Pi system over the internet.

Is there any way I can upload the stream to a cloud server efficiently and then access it?

  • Doesn't motion include an option to upload captures on a third party server ?
    – Tensibai
    May 26, 2017 at 14:00
  • @Tensibai how do i configure that for a live feed.. May 26, 2017 at 17:27
  • You cannot achieve real time live feed like this, more a 1 sec update, maybe not really a solution for you
    – Tensibai
    May 26, 2017 at 17:57

3 Answers 3


The problem you're trying to solve is called NAT traversal, where you're trying to communicate with another device while using carrier-grade NAT.

Potentially, you could proxy all of your packets through a server, using a protocol like SOCKS. This probably won't scale exceptionally well, but if you don't plan to have too many clients, it's probably acceptable. You will, of course, have to pay for or run a server outside your network (not inside a NAT), which may be slightly complex/inconvenient.

Alternatively, you could punch a hole through the router and communicate between your two intended clients directly. According to Wikipedia, "VoIP products, online gaming applications, and P2P networking software all use hole punching." If your use case is similar to that, it may be worth considering.

You may also find this question on Super User relevant, with an answer by spacecrab:

Yes, option: purchase access with a VPN service that allows for a static IP and port forwarding, you will be able to have clients talk directly to your device(s) as you'd expect.

Option two: Find a deal on a VPS (Virtual Private Server) and configure a popular VPN software like OpenVPN yourself. End result is the same, configuration part is much more in-depth. Good learning experience if you're trying to find a reason to spend an afternoon educating yourself on light networking.

  • Thank you.. @Aurora0001 seems like a good way.. The VPN solution. Let me wait for a few more answers otherwise this one is the approved answer.. May 26, 2017 at 17:28
  • @ShaktiPhartiyal No problem; it's always a good idea to wait and see if there are any better answers around, and I hope my answer gets you on the right track. No need to accept immediately!
    – Aurora0001
    May 26, 2017 at 17:31
  • 1
    @Aurora0001 your answers have always helped me..
    – IoT Lover
    May 26, 2017 at 17:32
  • @Aurora0001 can you help me out how to to go ahead with SOCKS. any starting points ? May 26, 2017 at 17:35
  • @ShaktiPhartiyal I've not followed it myself, but DigitalOcean's tutorial for setting up a tunnel looks pretty clear.
    – Aurora0001
    May 27, 2017 at 13:53

I wonder if another solution would be to have your Raspberry Pi PUSH the feed out to a cloud server.

The other answer provides the best possible way to get INTO your pi from outside, but if you don't need to do that, if you just want occasional security camera-style images, you could script something that would watch a folder, and when a new image appears, upload that to a remote location. If you want the full feed, you could stream to something like youtube, keep the feed private, and then go there whenever you want to.

Here's steps for the youtube process:


Here's how to automatically upload a folder:



A lot of ISP providers do not allow residential customers to use port 80 or 8080. Try using a different port number with Motion, and also check with your ISP to see which ports are allowed. You also need to activate port forwarding on the Netgear router, so traffic is routed to the Raspberry Pi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.