Ways of dealing with dynamic IP

2

This is my first time setting up a home server so sorry for missing things that might be obvious to you. I have bought a 1€ domain on 1&1 and I would like to have it pointing to my home server. I was wondering, what are the ways of dealing with the problem of being assigned a dynamic IP by your ISP?

  • Buying a static IP for 15€ a month (out of question, I am a college student and the server is not for business but for learning purposes)

  • Write your own script to update what IP 1&1 points your domain to - this is free, but not only will the script be not usable if they change anything in the interface, but you will also have to wait up to 48 hours for the changes to be propagated every time because 1&1 basically has to tell all the DNS servers on the internet to point to my new IP (right?)

  • Forwarding my domain to a nameserver from services like dyndns or noip.com (which I assume provide you with a notify-change-script)? They propagate changes instantly (because all the DNS-servers on the internet now point to their server and so only the forwarding-configuration on their server has to be changed), but their service costs money (right?)

  • https://discourse.osmc.tv/t/howto-free-tk-domain-name-that-always-points-to-your-pi/14083 Then I also found this tutorial/script, for forwarding my domain to cloudflare in order to use an own script/worker for the IP-status update (and otherwise being the same solution as with noip.com). It seems to be written for Raspbian, but I think it should work with an Ubuntu Docker container too.... This is a free solution, but as soon as cloudflare changes the interface the script won't work anymore.

Are there any other solutions I am missing?

I should mention, I need to utilize both https:// for serving web-pages and wss:// (secure websocket) for a worker. So whatever the solution, it should include having to pay no extra money for TLS certificates.

[EDIT] This post helped me immensely in understanding why services like Cloudflare or DynDNS exist in the first place if you can change the forwarded IP at 1&1 itself: How does DynamicDNS act immediately? For similar solutions free of charge you can also look into DuckDNS and Afraid.org

DBRN

Posted 2016-12-12T09:47:52.030

Reputation: 143

1&1 should provide you with a way of pointing the domain to your server. This is normally done throu an DNS-Server. Most of the time you can just listen for external ip changes and then update the DNS via script – BlueWizard – 2016-12-12T13:50:48.743

As I said, from my understanding 1&1 updates the changes on the domain name system on the entire Internet, which they say can take up to 48 hours, see https://help.1and1.com/domains-c36931/manage-domains-c79822/dns-c37586/change-your-domain-s-ip-address-a-record-a599296.html but I need IP changes to affect in at most minutes. Also they say If your domain is assigned with one of the 1&1 Control Panel tools, you should be able to determine which tool the domain is assigned to by the Domain Overview page. I have not yet tried their tools out but I expect this to bring some new problems...

– DBRN – 2016-12-12T14:11:14.690

Answers

0

For the first purpose i think buy a static IP or Professional Subscription to you're ISP.

Another solution exist. You can create a dynamic DNS on a website like No-Ip for the example. You can configure you're router for a daily update of you're public IP. U will maybe have 5 minutes for the propagation of you're new address.

I hope i help you a bit, good luck for you're investigation.

For the SSL/TLS maybe you can use Let's Encrypt ? But i dont know if that work with a sub-domain of dydns :/

Mayuri S

Posted 2016-12-12T09:47:52.030

Reputation: 1

letsencrypt works for subdomains too – Mox – 2016-12-12T12:33:12.943

lets-encrypt will not work with no-ip though:

Unfortunately, this is not possible since we do not approve SSL certificates on our Free and Enhanced domains.

One option is to make a self signed certificate for your servers. This will prompt visitors with a security warning and they would be able to accept the security exception. The connection is still secure, you just don’t have a third party verifying the chain of trust. – DBRN – 2016-12-12T13:54:46.713

0

It isn't clear what kind of connection you have at home, but assuming it's broadband (cable or DSL), your IP address isn't likely to change very often. Over the past 15 years, I have found that mine changes less than once per year (currently I have cable through Time-Warner in the United States). Even when my cable modem goes offline (power outages are frequent in my area), the IP address doesn't change. And yes, it's dynamic. So the approach that works for me is to simply update my DNS record whenever I need to.

Charles Burge

Posted 2016-12-12T09:47:52.030

Reputation: 1 792

0

I struggled with this for a long time. I can only speak what works for me at the current time. My Domain Name register and DNS services were provided by NoIP.com. I had a very good experience with this provider and used their dynamic update client via a cron job for many many years however I needed more control of my DNS records which noip.com didn't provide.

DNS provider

I transferred by dns records to cloudflare -- process really simple and entire transfer only took a few hours. Cloudflare is free of charge.

Get a registered domain name

I had already had a domain name registered through noip.com -- I think 5 year registration around $100 -- so unfortunately domain name registration isn't free but I'd suggest you get a real domain name since it can be indefinitely used in the future.

SSL certificates

SSL certificates for the domain name are provided by Let's Encrypt (free SSL certificates $0). Only downside to Let's Encrypt is the certificates need to be renewed every 90 days. This is definitely manageable with a few scripts, and their re-certification process works very well with certbot/cloudflare-dns plugin.

Dynamic Update Client Options

  1. In terms of dynamically updating the DNS records. It depends on your setup. I don't think Cloudflare specifically has a dynamic DNS updater client. I using a few methods
    • I have a pfsense router and this has a built-in Dynamic Update Client for Cloudflare
    • Use DNS-O-Matic as an intermediate hop to update your DNS records. (Free Service). I believe there are many DNS updater client for DNS-O-Matic available, so you could use these.
    • Use ddclient which can interact with cloudflare -- program runs as a system service on linux. Linux is a requirement along with just a touch of elbow grease to get this working.

Hopefully that is a few ideas to point you in the right direction.

KevDog

Posted 2016-12-12T09:47:52.030

Reputation: 1