2

I have a home where the ISP does not allow static IPs for hosts. I have a computer (that I will call A from now on) in that home that has a SSH server running on it and I would like to connect to it remotely.

Its IP, however, may change from time to time.

I also have a webserver with a static IP and a domain name.

My idea is having A periodically send its own public IP to the webserver. If I want to get the current public IP of A from another machine, so that I can connect to it through SSH, I ask the webserver for its last received public IP and use it.

Does my solution sound reasonable? Is there any software that already does this, or do I have to write my own?

2
  • This would work, but you might want to look into a dynamic DNS service (google it) which solves the exact problem.
    – Paul
    Commented Mar 17, 2015 at 22:50
  • I use a dynamic IP server, as the answers describe, but it went off-line for a time, and I did precisely what you are proposing, so that I could use www.MyWebSite.Net/Home to address my home machine. I have the web pages to achieve this and scripts for both Linux and Windows, as I have home servers on both. There is no link to /Home from my public web pages, so the home servers will not be found by web crawlers.
    – AFH
    Commented Mar 17, 2015 at 23:15

2 Answers 2

3

The usual approach is to use a Dynamic DNS provider. Two examples (without prejudice) are dyn.com and no-ip.org. The idea is that you register a domain name (myhouse.example.net, say) and the DDNS provider will map that to your current IP address.

You may find that your home router has a DDNS client built-in that will talk to one of the many DDNS providers available. Failing that, it's possible to download and install a client on one of your systems on your network and have it periodically check for a change to your external IP address.

1
  • Awesome. My router supports no-ip.org natively. Commented Mar 17, 2015 at 22:57
1

The technology you are looking for is called Dynamic DNS or DynDNS.

Detailed explanation can be found on Wikipedia: http://en.wikipedia.org/wiki/Dynamic_DNS

In short, you set up a domain name (usually a subdomain, like host-a.dyndns.org) and use a tool that checks your public IP and makes sure that the hostname always points to your current IP.

There is a a bunch of free and paid service providers for DynDNS, and most of them offer software to keep the domain name updated. A lot of home routers also support a DynDNS account, which keeps your domain name mapped to your public IP 24/7.

If you want to use your own domain, you could simply create a CNAME DNS record like "host-a.vittorio.com" which points to your new DynDNS hostname, like host-a.dyndns.org.

Hope that helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .