Posts: 1
Joined: Thu Dec 07, 2017 3:34 pm

Port forwarding from public IP to internal IP

Thu Dec 07, 2017 3:39 pm

I’m trying to set up a small camera surveillance project on a construction site without cable internet access so I’m able to follow up on construction from anywhere basically. I’ll be using an LTE modem for internet access (dynamic ip). I’m not a super experienced coder or hardware expert so please bear with me as I’m trying to learn step by step :)

For a small schematic overview of my setup please check:

So I’ve got an IP camera attached to a PoE network switch, together with the raspberry pi and an LTE modem. In order to access the live feed or a screencap I can access it from the raspberry pi using the following url (network on the PoE Switch):

In order to get internet access I have an LTE modem attached to it. The mobile connection does not offer a fixed IP address, so I have a script running on the raspberry pi that checks it’s public IP address on a set interval and uploads it to an S3 bucket if it detects a change so I always know the current public IP address (which of course I’m guessing I need in order to connect to the raspberry pi or the IP Cam).

Now to the main issue: I’m trying to figure out how to reroute a request from an external source (me somewhere from remote location) through the public IP address to the internal IP ( where I can access the live feed.

So my main questions are:
- How to reroute incoming request to the correct camera?
- What if I decide to attach multiple camera’s?
- How do I make sure this is done in secure way?
- Right now it feels like I should set up a kind of web server on the raspberry pi to handle the incoming request, authentication and rerouting to correct camera part? But being fairly new to this stuff, not sure…

Any pointers or advice on this would be more than welcome. Not expecting someone to solve it for me, just trying to find some pieces to try and solve the puzzle myself :)



Posts: 8511
Joined: Wed Jan 25, 2012 6:39 pm

Re: Port forwarding from public IP to internal IP

Thu Dec 07, 2017 8:26 pm

1. Many mobile operators do NOT give you a publicly routeable address. In which case you cannot make that connection method work. What IP address are they giving you? If you don't want to reveal that here, then use a search engine to read about what ranges are publicly routeable and which are not. If it isn't routeable they are using Carrier Grade NAT (CGNAT) and you cannot port forward through that.

2. Your TP-Link SG108 is an ethernet switch, not a NAT router. Unless your mobile operator is giving you more than one IP address you can only connect one device if you don't have a NAT, either an inherent part of the LTE modem or as a separate item.

Return to “Networking and servers”

Who is online

Users browsing this forum: okenido, Roken and 17 guests