{"id":157,"date":"2019-05-13T11:17:15","date_gmt":"2019-05-13T11:17:15","guid":{"rendered":"https:\/\/blog.iabsolute.com\/?p=157"},"modified":"2019-05-13T11:17:15","modified_gmt":"2019-05-13T18:17:15","slug":"assigning-a-static-ip-on-ubuntu","status":"publish","type":"post","link":"https:\/\/blog.iabsolute.com\/?p=157","title":{"rendered":"assigning a static IP on ubuntu"},"content":{"rendered":"\n<p>To assign a static IP you need to edit \/etc\/network\/interfaces<\/p>\n\n\n\n<p>The current entry will look something like<br>\nauto eth0<br>\niface eth0 inet dhcp<br>\nYou will need you need to change this to:<br>\nauto eth0<br>\niface eth0 inet static<br>\n   address 10.253.0.50<br>\n   netmask 255.255.255.0<br>\n   network 10.253.0.0<br>\n   gateway 10.253.0.1<br>\n   dns-nameservers 8.8.8.8<\/p>\n\n\n\n<p>Then restart networking sudo service networking restart<\/p>\n\n\n\n<p>Set your IP address changes in \/etc\/network\/interfaces. Example:<br>\nauto eth0<br>\niface eth0 inet static<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/blogs.iabsolute.com\/wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":)\"\/><\/figure>\n\n\n\n<p>address 192.168.1.128<br>\nnetmask 255.255.255.0<br>\nnetwork 192.168.1.0<br>\nbroadcast 192.168.1.255<br>\ngateway 192.168.1.1<br>\nDon\u2019t give your DNS configurations in \/etc\/resolv.conf because while we restart the server sometimes the configuration get erased.<br>\nSo use vim \/etc\/resolvconf\/resolv.conf.d\/base (while updating configs in this it doesn\u2019t get removed)<br>\nexample:<br>\nsearch  (domain name)<br>\nnameserver 8.8.8.8<br>\nnameserver 8.8.4.4<br>\nSave and then restart your server, this fixed my static issue! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>To assign a static IP you need to edit \/etc\/network\/interfaces The current entry will look something like auto eth0 iface eth0 inet dhcp You will need you need to change this to: auto eth0 iface eth0 inet static address 10.253.0.50 &hellip; <a href=\"https:\/\/blog.iabsolute.com\/?p=157\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":1,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"predecessor-version":[{"id":158,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions\/158"}],"wp:attachment":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}