{"id":22249,"date":"2024-10-04T19:52:43","date_gmt":"2024-10-04T17:52:43","guid":{"rendered":"https:\/\/contabo.com\/blog\/kb\/103000283119-why-is-my-private-ip-missing-from-my-centos-7-server\/"},"modified":"2025-04-10T17:59:26","modified_gmt":"2025-04-10T15:59:26","slug":"103000283119-why-is-my-private-ip-missing-from-my-centos-7-server","status":"publish","type":"kb","link":"https:\/\/contabo.com\/blog\/kb\/103000283119-why-is-my-private-ip-missing-from-my-centos-7-server\/","title":{"rendered":"Why is My Private IP Missing From My CentOS 7 Server?"},"content":{"rendered":"<h4 dir=\"ltr\"><strong>Why is my private IP missing from my CentOS 7 server?<\/strong><\/h4>\n<p dir=\"ltr\">When restarting a CentOS 7 server after adding it to a private network, the configuration of the new private network interface might fail, leaving it without an IP address. <strong>This can be fixed by retrying after applying a small change to cloud-init:<br \/><\/strong><br \/># Patch cloud-init<br \/>sudo sed &#8220;s\/== &#8216;static&#8217;\/in [&#8216;static&#8217;, &#8216;static6&#8217;]\/&#8221; -i \/usr\/lib\/python2.7\/site-packages\/cloudinit\/net\/sysconfig.py<\/p>\n<p># Reset cloud-init<br \/>sudo cloud-init clean<\/p>\n<p># Reboot to apply<br \/>sudo reboot<\/p>\n<p><\/p>\n<p>This is only necessary if you are just doing a reboot. The IP configuration should always succeed after a reinstall. Other operating systems are also unaffected.<strong dir=\"ltr\"><br \/><\/strong><\/p>\n<\/p>\n<p><span class=\"ast-load-more active\"><a href=\"https:\/\/help.contabo.com\/en\/support\/solutions\/articles\/103000283119-why-is-my-private-ip-missing-from-my-centos-7-server-\" rel=\"nofollow\">Details&#8230;<\/a> <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why is my private IP missing from my CentOS 7 server? When restarting a CentOS 7 server after adding it to a private network, the configuration of the new private network interface might fail, leaving it without an IP address. This can be fixed by retrying after applying a small change to cloud-init:# Patch cloud-initsudo [&hellip;]<\/p>\n","protected":false},"author":72,"featured_media":0,"template":"","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2067],"tags":[],"class_list":["post-22249","kb","type-kb","status-publish","hentry","category-kb"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Contabo Web","author_link":"https:\/\/contabo.com\/blog\/author\/julius-nalivaiko\/"},"uagb_comment_info":0,"uagb_excerpt":"Why is my private IP missing from my CentOS 7 server? When restarting a CentOS 7 server after adding it to a private network, the configuration of the new private network interface might fail, leaving it without an IP address. This can be fixed by retrying after applying a small change to cloud-init:# Patch cloud-initsudo&hellip;","_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/72"}],"version-history":[{"count":1,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22249\/revisions"}],"predecessor-version":[{"id":22864,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22249\/revisions\/22864"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=22249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=22249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=22249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}