CINXE.COM

Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux) - IONOS Help

<!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <!-- This website is powered by TYPO3 - inspiring people to share! TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL. TYPO3 is copyright 1998-2025 of Kasper Skaarhoj. Extensions are copyright of their respective owners. Information and contribution at https://typo3.org/ --> <title>Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux) - IONOS Help</title> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="generator" content="TYPO3 CMS"> <meta name="description" content="This article explains the steps required to connect a domain to a network with a changing IP using Dynamic DNS."> <meta name="robots" content="index,follow"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0"> <meta property="og:type" content="article"> <meta property="og:site_name" content="IONOS Help"> <meta property="og:title" content="Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux) - IONOS Help"> <meta property="og:url" content="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"> <meta name="twitter:card" content="summary"> <meta name="pagetype" content="article"> <link rel="stylesheet" href="/help/_assets/11ead071f9bbdd39bc01861cfe60def3/Css/FrontendServices.php?1739778348" media="all"> <link rel="stylesheet" href="https://ce1.uicdn.net/exos/framework/2.1/ionos.compat.min.css" media="all"> <link rel="stylesheet" href="/help/typo3temp/assets/compressed/merged-6bb470ee9a60354d7511c83f1cf31d35-9487f5b95e7f4ef4bcf1c081a82e5dfb.css?1739785284" media="all"> <link rel="stylesheet" href="/help/typo3temp/assets/compressed/merged-c1d0c226906c5df9598acc57d0f190a8-73bf8ce61c4e546fc95013a5e79d110f.css?1739785284" media="print"> <script src="/help/typo3temp/assets/compressed/globalnavigation-52d7fb1eda77bf2117c396e3e122e21a.js?1739785284"></script> <script src="/help/typo3temp/assets/compressed/login-98dc2979e9a3342deb91618236eaba38.js?1739785284"></script> <script src="https://frontend-services.ionos.com/t/tag/IONOS/helpAndLearn.js" async="1" defer="defer" id="oaotag"></script> <script src="/help/typo3temp/assets/compressed/merged-9f138adb3d5de63ade219670107f3d67-dcc55e3fbcfeb71f9bab499f97d11a3b.js?1739785291"></script> <link rel="shortcut icon" href="/favicon.ico" /> <meta name="application" content="unknown" /> <meta name="elastic" content="index" /> <meta name="application" content="unknown" /> <meta name="page-id" content="4463" /> <meta name="page-name" content="Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux)" /> <meta name="search" content="1" /> <meta name="article-id" content="4463" /> <meta name="article-name" content="Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux)" /> <meta name="topic-id" content="439" /> <meta name="topic-name" content="Configuring Your IP Address" /> <meta name="category-id" content="44" /> <meta name="category-name" content="Domains" /> <meta name="lang" content="3" /> <meta name="user-state" content="" /> <meta name="category-enum" content="DOMAIN" /> <script type="text/javascript">if (document.querySelectorAll("meta[name='user-state']").length > 0) { document.querySelectorAll("meta[name='user-state']").item(0).setAttribute("content", document.cookie.indexOf("eue_ftk") !== -1 ? "customer" : "unknown"); }</script> <meta property="og:image" content="https://www.ionos.com/help/_assets/11ead071f9bbdd39bc01861cfe60def3/Images/ionos-logo.png"><meta property="pagelayout" content="pagets__article" /><meta property="siteurl" content="https://www.ionos.com/help/" /><script src="//cdn.ionos.de/hcp/9c2134ba72b4/b450de0cbe91/launch-41452919a9b8.min.js" async></script><script src="https://ce1.uicdn.net/js/sentry/6.4.1/bundle.tracing.min.js"></script> <script type="text/javascript"> window.sentryIntegration = { "dsn": "https://a7f15d11f3114882ac19a65f1291b94f@sentry.ionos.com/11", "release": "UNKNOWN@UNKNOWN", "env": "production" }; </script> <script src="/help/_assets/202a0bd0811f39acbc77196677ca0869/JavaScript/sentryIntegration.js"></script><script>let pageId="4463";let language="3";</script> <link rel="canonical" href="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"/> <link rel="alternate" hreflang="de" href="https://www.ionos.de/hilfe/domains/ip-adresse-konfigurieren/domain-mittels-dynamischen-dns-mit-einem-netzwerk-mit-wechselnder-ip-verbinden-linux/"/> <link rel="alternate" hreflang="de-AT" href="https://www.ionos.de/hilfe/domains/ip-adresse-konfigurieren/domain-mittels-dynamischen-dns-mit-einem-netzwerk-mit-wechselnder-ip-verbinden-linux/"/> <link rel="alternate" hreflang="de-DE" href="https://www.ionos.de/hilfe/domains/ip-adresse-konfigurieren/domain-mittels-dynamischen-dns-mit-einem-netzwerk-mit-wechselnder-ip-verbinden-linux/"/> <link rel="alternate" hreflang="en" href="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"/> <link rel="alternate" hreflang="en-CA" href="https://www.ionos.ca/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"/> <link rel="alternate" hreflang="en-GB" href="https://www.ionos.co.uk/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"/> <link rel="alternate" hreflang="en-US" href="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/"/> <link rel="alternate" hreflang="es" href="https://www.ionos.es/ayuda/dominios/configurar-la-direccion-ip/conectar-el-dominio-a-una-red-con-ip-dinamica-utilizando-dns-dinamico-linux/"/> <link rel="alternate" hreflang="es-ES" href="https://www.ionos.es/ayuda/dominios/configurar-la-direccion-ip/conectar-el-dominio-a-una-red-con-ip-dinamica-utilizando-dns-dinamico-linux/"/> <link rel="alternate" hreflang="es-MX" href="https://www.ionos.mx/ayuda/dominios/configurar-la-direccion-ip/conectar-el-dominio-a-una-red-con-ip-dinamica-utilizando-dns-dinamico-linux/"/> <link rel="alternate" hreflang="fr" href="https://www.ionos.fr/assistance/domaines/configurer-des-adresses-ip/connecter-un-domaine-a-un-reseau-avec-changement-dip-en-utilisant-dynamic-dns-linux/"/> <link rel="alternate" hreflang="fr-FR" href="https://www.ionos.fr/assistance/domaines/configurer-des-adresses-ip/connecter-un-domaine-a-un-reseau-avec-changement-dip-en-utilisant-dynamic-dns-linux/"/> <link rel="alternate" hreflang="it-IT" href="https://www.ionos.it/aiuto/domini/configurare-un-indirizzo-ip/connettere-un-dominio-a-una-rete-con-ip-variabile-utilizzando-il-dns-dinamico-linux/"/> </head> <body id="us_page-4463" data-lang=""> <script type="text/javascript"> responsiveHeader(); var OAO = OAO || {}; OAO.q = OAO.q || {}; OAO.q.pageintegration = OAO.q.pageintegration || []; </script> <div class="page-content"> <div class="oao-navi-navigation oao-navi-light" xmlns:f="http://www.w3.org/1999/html"> <div class="oao-navi-left"> <div class="oao-navi-application-name"> <a class="oao-navi-app-name" href="https://www.ionos.com/help/"> <span class="oao-navi-app-logo"></span> <span> Help Center </span> </a> </div> </div> </div> <main id="content" class="clearfix knowledge" data-iframe-height=""> <a class="skip-target" name="skip-to-content"></a> <header class="page-header page-header--narrow"> <div class="page-header__block"> <div class="breadcrumb"> <a href="/help/" class="breadcrumb__item">Home</a> <a href="/help/domains/" class="breadcrumb__item">Domains</a> <a href="/help/domains/dns-settings/" class="breadcrumb__item">DNS Settings</a> </div> <h1 class="page-header__headline">Connecting a Domain to a Network with a Changing IP using Dynamic DNS (Linux)</h1> </div> </header> <div class="page-section page-section--narrow has-sticky-sidebar"> <div class="page-section__block"> <div class="grid"> <div class="grid-col grid-col--8 grid-col--medium-12 grid-col--small-12 grid-col--article"> <div class="sheet"> <section class="sheet__section sheet__section--activating" style="display: none;" id="displayDownloadPdfHint"> <p class="lead-paragraph">Please use the “Print” function at the bottom of the page to create a PDF.</p> </section> <section class="sheet__section"> <div class="ce-textpic ce-center ce-above"><div class="ce-bodytext"><p class="content-paragraph">A static IP address is usually required so that a computer, a home network, or a small company network can always be reached through the Internet under the same host name. This is also necessary if you want to connect to your home network using a VPN, for example. However, if your home network or small business network is connected to the Internet through certain types of connections like DSL, a new (dynamic) IP address is regularly assigned to the network. As a result, the computer, home network, or small business network cannot be permanently reached using the IP address.</p><p class="content-paragraph">In this case, you can use <strong>Dynamic Domain Name System (DNS)</strong> to automatically update the constantly changing IP addresses in the domain's DNS record so that your home network is permanently accessible under your domain.</p><p class="content-paragraph">To use the <strong>Dynamic DNS</strong>, you can use the multi-platform client from IONOS. This multi-platform client was written in Python.</p><p class="content-paragraph">The following describes the steps required to use the multi-platform client:</p></div></div> </section> <section id="c112043" class="sheet__section "> <a class="in-page-anchor" id="c112044"></a><h3 class="headline headline--sub"> Installing Python on a Computer Running Ubuntu </h3><div class="ce-textpic ce-center ce-above"><div class="ce-bodytext"><p class="content-paragraph">The following step-by-step instructions will show you how to install <strong>Python</strong> on a computer running the Ubuntu operating system.</p><h5 class="headline headline--paragraph">Check for the Installation</h5><ul class="content-list ordered-list"><li class="content-paragraph"><p class="content-paragraph">Check whether Python is already installed. To do this, enter the following command:</p><p class="code-snippet">python --version</p></li><li class="content-paragraph"><p class="content-paragraph">To check if pip is installed correctly, enter the following command:</p><p class="code-snippet">pip --version</p></li></ul><h5 class="headline headline--paragraph">Install Python</h5><ul class="content-list ordered-list"><li class="content-paragraph"><p class="content-paragraph">To install Python 3.x, enter the following commands.</p><p class="code-snippet">sudo apt update<br> sudo apt upgrade<br> sudo apt install software-properties-common<br> sudo apt-get install python3</p></li><li class="content-paragraph"><p class="content-paragraph">To install pip, enter the following command:</p><p class="code-snippet">apt install python-pip</p></li></ul></div></div> </section> <section id="c112047" class="sheet__section "> <a class="in-page-anchor" id="c112048"></a><h3 class="headline headline--sub"> Installing the Multi-Platform Client </h3><div class="ce-textpic ce-center ce-above"><div class="ce-bodytext"><ul class="content-list ordered-list"><li class="content-paragraph"><p class="content-paragraph">To install the multi-platform client, enter the following command:</p><p class="code-snippet">pip install domain-connect-dyndns</p></li><li class="content-paragraph"><p class="content-paragraph">To add the domain whose DNS settings are to be updated automatically, type the following command:</p><p class="code-snippet">domain-connect-dyndns setup --domain NAME_OF_THE_DOMAIN</p><p class="content-paragraph"> Example:</p><p class="code-snippet">domain-connect-dyndns setup --domain example.com </p></li><li class="content-paragraph"><p class="content-paragraph">Copy the URL and paste it into your browser.</p></li><li class="content-paragraph"><p class="content-paragraph">Log in to IONOS.</p></li><li class="content-paragraph"><p class="content-paragraph">Click <span class="control-element">Allow</span>.</p></li><li class="content-paragraph"><p class="content-paragraph">Make a copy of the code displayed.</p></li><li class="content-paragraph"><p class="content-paragraph">Open the command prompt and enter the code.</p></li><li class="content-paragraph"><p class="content-paragraph">To update all domains, type the following command:</p><p class="code-snippet"> domain-connect-dyndns update --all</p><p class="content-paragraph"> For example, after entering the command, the following message appears:</p><p class="code-snippet">[root@localhost ~]# domain-connect-dyndns update --all<br> Read example.com config.<br> IP 217.160.25.20 found in A record<br> New IP: 217.160.25.20<br> A record up to date.</p></li><li class="content-paragraph"><p class="content-paragraph">For the IP address to be updated regularly in the DNS record, a cronjob must be configured. To edit the crontab file, type the following command:</p><p class="code-snippet"> crontab -e</p></li></ul></div></div> </section> <section id="c112049" class="sheet__section sheet__section--neutral"> <div class="ce-textpic ce-center ce-above"><div class="ce-bodytext"><h5 class="headline headline--paragraph">Please Note</h5><ul class="content-list bullet-list"><li class="content-paragraph"><p class="content-paragraph"><strong>Cron jobs</strong> are executed by the <strong>Cron-Deamon</strong>. The Cron-Deamon is a service with which you can execute&nbsp;time-based scripts and programs. The commands to be executed are stored in a table, which is called <strong>Crontab</strong>.</p></li><li class="content-paragraph"><p class="content-paragraph">Information on editing and building the crontab file and syntax can be found in the article Cron.</p></li></ul></div></div> </section> <section id="c112051" class="sheet__section "> <div class="ce-textpic ce-center ce-above"><div class="ce-bodytext"><ul class="content-list ordered-list ordered-list-reset-9"><li class="content-paragraph"><p class="content-paragraph">Insert the cron job below:</p><p class="code-snippet">*/1 * * * * /usr/bin/flock -n /tmp/ipupdate.lck /usr/local/bin/domain-connect-dyndns update --all --config /root/dyndns/settings.txt</p></li></ul></div></div> </section> <hr class="sheet__separator survey" /> <section class="sheet__section sheet__section--secondary"> <script type="text/javascript" id="oao_feedback_script"> var OAO = OAO || {}; OAO.q = OAO.q || {}; OAO.q.ias = OAO.q.ias || []; OAO.q.ias.push(['setApplication', "HELP_CENTER"]); OAO.q.ias.push(['setPage', "SetupAssistant"]); </script> <a id="oao_feedback_link" class="oao-decision-survey" data-oao-decision-survey-type="helpful-article" data-oao-decision-survey-id="domains_4463" data-oao-decision-survey-context="hosting" ></a> </section> </div> </div> <div class="grid-col grid-col--4 grid-col--medium-hidden grid-col--small-hidden grid-col--article-sticky-sidebar"> <div class="card"><div class="card__content"><section class="card__section"><h4 class="card__headline">Content</h4><ul class="link-list"><li class="c112044"><a class="link-list__link" href="#c112044"> Installing Python on a Computer Running Ubuntu </a></li><li class="c112048"><a class="link-list__link" href="#c112048"> Installing the Multi-Platform Client </a></li><li class="jump-to-top hidden"><a href="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/#top" class="link-list__link"> To top </a></li></ul></section></div></div> </div> </div> </div> </div> </main> <footer class="page-footer" id="footer-container"> <div id="print-view-footer-info" class="hidden"> <p id="info-text" class="content-paragraph">This document is available online at the following address:</p> <p class="content-paragraph"><a href="https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/">https://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/</a></p> </div> <div class="page-footer__block"> <section class="page-footer__section page-footer__section--align-center"> <div class="page-footer__section-item"> <div class="card-block"> <a class="link-standard button-icon-before print-icon copy-text-e1" href="t3://page?uid=current#print">Print Page</a> </div> </div> <div class="page-footer__section-item"> </div> <div class="page-footer__section-item"> <div class="card-block"> <a href="https://x.com/IONOS_help_US" class="link-share" target="_blank"> <img title="X icon" src="https://www.ionos.com/help/_assets/11ead071f9bbdd39bc01861cfe60def3/Icons/x-twitter-no-background.png" width="32" height="32" alt="X icon" /> </a> <a href="http://ionos.ly/IONOS_FB_US" class="link-share icon-font facebook-icon" target="_blank"></a> <a href="mailto:?subject=Connecting%20a%20Domain%20to%20a%20Network%20with%20a%20Changing%20IP%20using%20Dynamic%20DNS%20%28Linux%29&body=Hi%2C%0A%0Ahere%20is%20some%20useful%20information%20and%20tips%20from%201%261%20IONOS%3A%0A%0Ahttps://www.ionos.com/help/domains/configuring-your-ip-address/connecting-a-domain-to-a-network-with-a-changing-ip-using-dynamic-dns-linux/%0ARegards%0A" class="link-share icon-font friend-icon reveal-title-by-hover link-recommend" title="Send Article by E-mail"></a> </div> </div> </section> <hr class="page-footer__seperator"/> <section class="page-footer__section page-footer__section--align-center"> <div class="page-footer__section-item page-footer__section-item--small-hidden"> <h2 class="subheadline-b2">IONOS Mobile App</h2> </div> <div class="page-footer__section-item"> <a class="appstore image-hover link-standard copy-text-e1" href="https://itunes.apple.com/app/1-1-hosting-manager/id1080444849?ct=cp.footer&amp;pt=335853&amp;mt=8" target="_blank"> <span class="hosting-manager copy-text-e1"></span> </a> </div> <div class="page-footer__section-item"> <a class="playstore image-hover link-standard copy-text-e1" href="https://play.google.com/store/apps/details?id=com.oneandone.ciso.mobile.app.android&amp;referrer=utm_source%3Dcp%26utm_campaign%3Dfooter" target="_blank"> <span class="hosting-manager copy-text-e1"></span> </a> </div> </section> <hr class="page-footer__seperator"/> <section class="page-footer__section page-footer__section--align-center"> <div class="page-footer__section-item page-footer__section-item--small-hidden"> <div class="oao-statuspage-overall-status"></div> </div> <div class="page-footer__section-item"> <a href="https://www.ionos.com" class="link-standard copy-text-c1">IONOS Inc.</a> • 2025 </div> <div class="page-footer__section-item"> <ul class="subheadline-b2"><li><a href="https://www.ionos.com/terms-gtc/index.php?id=1" class="link-standard copy-text-c1">T&amp;C</a></li><li><a href="https://www.ionos.com/terms-gtc/index.php?id=516" class="link-standard copy-text-c1">Privacy policy</a></li><li><a href="https://www.ionos.com/about" class="link-standard copy-text-c1">about</a></li><li><a href="https://www.ionos.com/digitalguide/" class="link-standard copy-text-c1">Digital Guide</a></li></ul> </div> </section> </div> </footer> </div> <div class="script-tag-container" style="display: none; position: absolute; bottom: 0; left: -10px; width: 0; height: 0;"> <script type="text/javascript"> doResponsiveThings(); </script> </div> <script src="https://ce1.uicdn.net/js/jquery-3.4.0.min.js"></script> <script src="/help/typo3temp/assets/compressed/merged-673472b82ef869fe45f315960716afb3-31953867a63f7df1ccb3c72b39e408b5.js?1739785284"></script> <script type="text/javascript">if(typeof _satellite !== 'undefined'){_satellite.pageBottom();}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10