{"id":192,"date":"2021-06-29T15:22:58","date_gmt":"2021-06-29T13:22:58","guid":{"rendered":"https:\/\/irg-net.com\/?p=192"},"modified":"2021-10-06T14:58:40","modified_gmt":"2021-10-06T12:58:40","slug":"set-up-static-ip-debian-10","status":"publish","type":"post","link":"https:\/\/irg-net.com\/index.php\/set-up-static-ip-debian-10\/","title":{"rendered":"Set Up Static IP Debian"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3 class=\"wp-block-heading\">In this basic tutorial I show you how to assign a static IP address to a Debian VM.<\/h3>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>The <strong>\/etc\/network\/interfaces <\/strong>contains network interface configuration information for our Debian VM. We need to edit this File with <strong>vim <\/strong>or <strong>nano (preferred) <\/strong>editor. Login into your Debian virtual machine as User or Root. If you are <strong>root<\/strong>, you don&#8217;t need to use <strong>sudo<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\"># The loopback network interface\nauto lo\niface lo inet loopback\n \n# The primary network interface\nallow-hotplug enp0s5\niface enp0s5  inet static<\/code><\/pre>\n\n\n\n<p>We need to edit this part of the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">allow-hotplug enp0s5\niface enp0s5  inet static<\/code><\/pre>\n\n\n\n<p>Now replace <strong><strong>allow-hotplug<\/strong><\/strong> with <strong>auto<\/strong> and <strong>dhcp<\/strong> with <strong>static<\/strong> in the lines. Add the following configuration to set up\/add new static IP on Debian. Here is my sample config file:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">auto enp0s5\niface enp0s5  inet static\n address 192.168.2.236\n netmask 255.255.255.0\n gateway 192.168.2.254\n dns-domain irg.net\n dns-nameservers 192.168.2.254<\/code><\/pre>\n\n\n\n<p>Please use your own IP Adresses, not the same like in my sample. Work with <strong>spacebar <\/strong>not <strong>tab <\/strong>button! <\/p>\n\n\n\n<p>Last but not least &#8211; we restart the networking service of our Debian VM to change the configuration from DHCP to Static:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">systemctl restart networking.service<\/code><\/pre>\n\n\n\n<p>Make sure the networking service restarted without any errors with following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">systemctl status networking.service<\/code><\/pre>\n\n\n\n<p>Sample Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">\u25cf networking.service - Raise network interfaces\n   Loaded: loaded (\/lib\/systemd\/system\/networking.service; enabled; vendor preset: enabled)\n   Active: active (exited) since Wed 2021-10-06 14:57:00 IST; 1min 38s ago\n     Docs: man:interfaces(5)\n  Process: 1104 ExecStart=\/sbin\/ifup -a --read-environment (code=exited, status=0\/SUCCESS)\n Main PID: 1104 (code=exited, status=0\/SUCCESS)<\/code><\/pre>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you have any questions, please leave a comment. \ud83d\ude42<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this basic tutorial I show you how to assign a static IP address to a Debian VM. The \/etc\/network\/interfaces contains network interface configuration information for our Debian VM. We need to edit this File with vim or nano (preferred) editor. Login into your Debian virtual machine as User or Root. If you are root, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,22,20],"tags":[],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-blog","category-debian","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Set Up Static IP Debian - irgNET<\/title>\n<meta name=\"description\" content=\"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set Up Static IP Debian - irgNET\" \/>\n<meta property=\"og:description\" content=\"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/\" \/>\n<meta property=\"og:site_name\" content=\"irgNET\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-29T13:22:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-06T12:58:40+00:00\" \/>\n<meta name=\"author\" content=\"H. Cemre G\u00fcnay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@irg_net\" \/>\n<meta name=\"twitter:site\" content=\"@irg_net\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"H. Cemre G\u00fcnay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/\"},\"author\":{\"name\":\"H. Cemre G\u00fcnay\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/person\\\/71b46e79e8c12bdc8e610214a6621a66\"},\"headline\":\"Set Up Static IP Debian\",\"datePublished\":\"2021-06-29T13:22:58+00:00\",\"dateModified\":\"2021-10-06T12:58:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/\"},\"wordCount\":174,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\"},\"articleSection\":[\"Blog\",\"Debian\",\"Linux\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/\",\"name\":\"Set Up Static IP Debian - irgNET\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#website\"},\"datePublished\":\"2021-06-29T13:22:58+00:00\",\"dateModified\":\"2021-10-06T12:58:40+00:00\",\"description\":\"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/set-up-static-ip-debian-10\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set Up Static IP Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#website\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\",\"name\":\"irgNET\",\"description\":\"a virtual Knowledge Base\",\"publisher\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\",\"name\":\"irg-NET\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i2.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i2.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1\",\"width\":2048,\"height\":2048,\"caption\":\"irg-NET\"},\"image\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/irg_net\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/h-cemre-g\u00fcnay-2b61601b4\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC8GknhO5YMAkAoVxppu6aaQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/person\\\/71b46e79e8c12bdc8e610214a6621a66\",\"name\":\"H. Cemre G\u00fcnay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"caption\":\"H. Cemre G\u00fcnay\"},\"sameAs\":[\"http:\\\/\\\/192.168.34.155\\\/wordpress\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set Up Static IP Debian - irgNET","description":"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/","og_locale":"en_US","og_type":"article","og_title":"Set Up Static IP Debian - irgNET","og_description":"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.","og_url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/","og_site_name":"irgNET","article_published_time":"2021-06-29T13:22:58+00:00","article_modified_time":"2021-10-06T12:58:40+00:00","author":"H. Cemre G\u00fcnay","twitter_card":"summary_large_image","twitter_creator":"@irg_net","twitter_site":"@irg_net","twitter_misc":{"Written by":"H. Cemre G\u00fcnay","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/#article","isPartOf":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/"},"author":{"name":"H. Cemre G\u00fcnay","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/person\/71b46e79e8c12bdc8e610214a6621a66"},"headline":"Set Up Static IP Debian","datePublished":"2021-06-29T13:22:58+00:00","dateModified":"2021-10-06T12:58:40+00:00","mainEntityOfPage":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/"},"wordCount":174,"commentCount":0,"publisher":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization"},"articleSection":["Blog","Debian","Linux"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/","name":"Set Up Static IP Debian - irgNET","isPartOf":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#website"},"datePublished":"2021-06-29T13:22:58+00:00","dateModified":"2021-10-06T12:58:40+00:00","description":"In this basic tutorial I show you how to assign a static IP address to a Debian 10 VM.","breadcrumb":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/set-up-static-ip-debian-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/"},{"@type":"ListItem","position":2,"name":"Set Up Static IP Debian"}]},{"@type":"WebSite","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#website","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/","name":"irgNET","description":"a virtual Knowledge Base","publisher":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization","name":"irg-NET","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/logo\/image\/","url":"https:\/\/i2.wp.com\/irg-net.com\/wp-content\/uploads\/2021\/06\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1","contentUrl":"https:\/\/i2.wp.com\/irg-net.com\/wp-content\/uploads\/2021\/06\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1","width":2048,"height":2048,"caption":"irg-NET"},"image":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/irg_net","https:\/\/www.linkedin.com\/in\/h-cemre-g\u00fcnay-2b61601b4\/","https:\/\/www.youtube.com\/channel\/UC8GknhO5YMAkAoVxppu6aaQ"]},{"@type":"Person","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/person\/71b46e79e8c12bdc8e610214a6621a66","name":"H. Cemre G\u00fcnay","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","caption":"H. Cemre G\u00fcnay"},"sameAs":["http:\/\/192.168.34.155\/wordpress"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":47,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":741,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions\/741"}],"wp:attachment":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}