I would like to access my PC remotely without using any dedicated service (i.e. teamviewer) for that. Ideally some installed script installed on this PC would detect if its internet public IP changes and post it anywhere I could grab it. Then I could remotely interact with it (ssh for instance). Is that even possible?


There's an existing system for this: Dynamic DNS.

There shouldn't be any need to roll your own solution.


Personally (a developer answer), I would create a simple react REST API and run that on a cloud server somewhere. (or in PHP if I was being lazy)

This REST API would take in an IP address POSTed to it, update the value, then display to the user on a GET request. Meaning you can easily obtain this IP address when you are external from your network.

Then get your machine to post it's IP address to that REST API endpoint on a timed basis, or when it detects and external IP change. This could be done with a simple cronjob or task schedule.

  • Thanks Gareth. In practice, how would the last point be done in a script? i.e. get the public IP (not a LAN ip for instance) and post it through a url. – Nicolas Cadilhac Sep 19 '20 at 13:49
  • @NicolasCadilhac cyberciti.biz/faq/… – Hagen von Eitzen Sep 19 '20 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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