-1

Im setting up a raspberry based surveillance system using motioneyeos.

I connect the raspberry to the router and set the Nat in the router to redirect connections to port 80 to the raspi. And it works.

The problem is that the system is gonna be in a house where I have no internet, so I'm using an old phone with a SIM there. I connect to the 4G and open the hotspot. Then I connect the raspberry to the hotspot and, from the same net, it works nice.

Now when I connect from the outside I cannot access the raspi, obviously. I can only access the phone. Is there a way to do the Nat as we do in our routers?

ugexe
  • 5,297
  • 1
  • 28
  • 49
javirs
  • 1,049
  • 26
  • 52
  • It's actually rather doubtful that you could access the phone from outside either, but regardless this question is off topic as it concerns network configuration, not software development. – Chris Stratton Apr 11 '19 at 01:16
  • im really sorry for the people who downvoted.. but It IS possible and I have it working. I used a (free for non commercial) service called remote.it. And I solved it without modifying my network structure. – javirs Apr 12 '19 at 06:24

1 Answers1

0

The solution is use remote.it. This is a free for non commercial service that has a server in the cloud.

  • You have to go to remote.it and create an account, and retrieve a token.
  • Then you install their client in your raspberry pi and execute it (is console based, so good for headless systems)
  • provide it with your user, pasword, and token
  • tell him you want to share SSH(22) and HTML(80)

Now your raspi makes an outgoing connection to their server, that is not prevented by your 3G connection. In order to access your raspi from the outside you have to:

  • Visit remote.it and login. You should be able to see your registered devices
  • select the device, and the protocol you want to get
  • the website will provide a fake address and port
  • connect (putty, ssh, or webbrowser) to this address and voilá.

You are accessing your pi from behind the 3G router without dealing with new hardware nor configuring networks

javirs
  • 1,049
  • 26
  • 52