1

I have a raspberry on a dynamic IP network where I can't open ports and I need to be able to reach it even if it gets rebooted (all I need is the port 22).

My first idea was to combine no-ip client (which gives me a DNS and an api that allows me to update it with whatever IP I want through CNAMES/A/ecc..) and a reverse tunnel with ngrok. In this way, as long as I know ngrok's assigned IP I could have access to the Raspberry.

The problem is that Ngrok assigns me a random <ip:port> every time it's restarted (such as 6.tcp.ngrok.io:1234) and CNAMEs only work with IPs, not ports.

Sapu
  • 11

1 Answers1

1

Dynamic DNS solutions, such as No-IP, are updating a fixed domain name to point to your public IP. If you are unable to forward ports, this won't work for you, because services won't be reachable on your public IP anyway.

What ngrok does is it opens a tunnel to a 3rd party server that already has its DNS/static IP figured out. It doesn't give you an additional public IP/domain. Instead it configures a remote server to forward traffic to your computer over a connection that your computer initiates, thus bypassing any NAT.

Your problem is how to make ngrok use a fixed domain. This problem is solved by paying $60 a year for the cheapest premium plan.

There are free self-hosted alternatives to ngrok, but you need to host them somewhere and that somewhere costs you money and your time.

gronostaj
  • 58,482