{"id":434,"date":"2024-03-18T12:44:59","date_gmt":"2024-03-18T12:44:59","guid":{"rendered":"https:\/\/www.simplyhosting.com\/support\/?post_type=ht_kb&#038;p=434"},"modified":"2024-03-18T12:47:09","modified_gmt":"2024-03-18T12:47:09","slug":"configuring-an-additional-ip-address-on-a-linux-server","status":"publish","type":"ht_kb","link":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/","title":{"rendered":"Configuring an Additional IP Address on a Linux Server"},"content":{"rendered":"\n<p>This document will take you through the process of adding an additional IP address to a Linux Server Network Configuration. The files you need to amend vary based on the distribution of Linux installed; however, all changes are executed at the command line that is accessed via SSH using the default IP address of your server.<\/p>\n\n\n\n<p>To get SSH access, you will need your root password (displayed in the Control Panel) and an SSH client. We recommend Putty, which can be downloaded for free at:    <\/p>\n\n\n\n<p>                                                                                                                                                                <a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\">https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html<\/a><br><\/p>\n\n\n\n<p>Consult the guide, Connecting to a Linux Server via SSH for instructions on how to download and configure Putty to launch the terminal window with the command line.<\/p>\n\n\n\n<p>Follow the below steps once you have a terminal window open:<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>Configuring an IP Address for Ubuntu &amp; Debian<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open \/etc\/network\/interfaces. An example of the file is below: <\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 1)<\/mark><\/p>\n\n\n\n<p>2. Below the line:<\/p>\n\n\n\n<p><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\"><strong>auto eth0<\/strong><\/mark><\/code><\/p>\n\n\n\n<p>Add the following line:<br><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">auto eth0:1<\/mark><\/strong><\/code><\/p>\n\n\n\n<p>3. Below the first interface description&nbsp;<code>iface eth0<\/code>&nbsp;add the description of the second interface:<\/p>\n\n\n\n<p><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\"><strong>iface eth0:1 inet static<br>address 207.210.118.58<br>netmask 255.255.255.224<br>broadcast 207.210.118.63<br>network 207.210.118.32<br>gateway 207.210.118.33<\/strong><\/mark><\/code><\/p>\n\n\n\n<p>Make sure the mask and gateway are correct. These would be identical to the ones already specified. The only thing that changes is the IP address you want to add. The resulting file should look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-2-iface-1611746d55be.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 2)<\/mark><\/p>\n\n\n\n<p class=\"has-large-font-size\">Configuring an IP Address for Centos<\/p>\n\n\n\n<p>The process for Centos is slightly different in that you create a new interface file instead of amending and adding to the existing one.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the following directory on your server:<br><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\"><strong>\/etc\/sysconfig\/network-scripts<\/strong><\/mark><\/code><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-3-network-scripts-3489f00407a7.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 3)<\/mark><\/p>\n\n\n\n<p>If you do an ls on this directory, you will see several files listed as illustrated below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-4-ls-28877177c69b.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 4)<\/mark><\/p>\n\n\n\n<p>2. Verify which interface you will use to add IP addresses. Typically, this will be eth0 for public IP addresses. Type:<\/p>\n\n\n\n<p><br><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\"><strong>ifconfig<\/strong><\/mark><\/code><\/p>\n\n\n\n<p>This will produce output similar to the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-5-eth-c000b55681b9.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 5)<\/mark><\/p>\n\n\n\n<p>3. Make a copy of&nbsp;<code>ifcfg-eth0<\/code>&nbsp;for each IP you wish to add and name them&nbsp;<code>ifcfg-eth0&gt;:0<\/code>,&nbsp;<code>ifcfg-eth0:1<\/code>, as shown below. Press &#8216;Return&#8217; after each cp command:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-6-copy-7b34491ed827.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 6)<\/mark><\/p>\n\n\n\n<p>4. Open each command and change the DEVICE, IPADDR and NETMASK fields accordingly. A sample entry for each file would look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-7-change-581da9e37d10.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 7)<\/mark><\/p>\n\n\n\n<p>5. Restart the network service:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-8-restart-94dbeb59c50d.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">(Screen 8)<\/mark><\/p>\n\n\n\n<p>Apply the changes made to the network configuration. Watch for any errors identified when restarting the service.<\/p>\n\n\n\n<p>6. Use the following command again to verify the IP address assigned to your server:<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">ifconfig<\/mark><\/strong><\/p>\n\n\n\n<p>Try to get SSH access to the server using the newly-added IP address to make sure it has been correctly added and is properly working.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This document will take you through the process of adding an additional IP address to a Linux Server Network Configuration. The files you need to amend vary based on the distribution of Linux installed; however, all changes are executed at the command line that is accessed via SSH using the default IP address of your [&hellip;]<\/p>\n","protected":false},"author":14,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[60],"ht-kb-tag":[67],"class_list":["post-434","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-simply-cloud","ht_kb_tag-add-ip-address-on-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"og:description\" content=\"This document will take you through the process of adding an additional IP address to a Linux Server Network Configuration. The files you need to amend vary based on the distribution of Linux installed; however, all changes are executed at the command line that is accessed via SSH using the default IP address of your [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-18T12:47:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/\",\"url\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/\",\"name\":\"Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers\",\"isPartOf\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg\",\"datePublished\":\"2024-03-18T12:44:59+00:00\",\"dateModified\":\"2024-03-18T12:47:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage\",\"url\":\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg\",\"contentUrl\":\"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.simplyhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuring an Additional IP Address on a Linux Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/#website\",\"url\":\"https:\/\/www.simplyhosting.com\/support\/\",\"name\":\"Support Centre - Simply Hosting &amp; Servers\",\"description\":\"Simply Hosting &amp; Servers Support Centre\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.simplyhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers","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:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/","og_locale":"en_GB","og_type":"article","og_title":"Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers","og_description":"This document will take you through the process of adding an additional IP address to a Linux Server Network Configuration. The files you need to amend vary based on the distribution of Linux installed; however, all changes are executed at the command line that is accessed via SSH using the default IP address of your [&hellip;]","og_url":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/","og_site_name":"Support Centre - Simply Hosting &amp; Servers","article_modified_time":"2024-03-18T12:47:09+00:00","og_image":[{"url":"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/","url":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/","name":"Configuring an Additional IP Address on a Linux Server - Support Centre - Simply Hosting &amp; Servers","isPartOf":{"@id":"https:\/\/www.simplyhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage"},"image":{"@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg","datePublished":"2024-03-18T12:44:59+00:00","dateModified":"2024-03-18T12:47:09+00:00","breadcrumb":{"@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#primaryimage","url":"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg","contentUrl":"https:\/\/www.simplyhosting.cloud\/images\/simplycloud\/knowledgebase\/os\/ip-linux\/Screen-1-open-5efeeddf7975.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/configuring-an-additional-ip-address-on-a-linux-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simplyhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Configuring an Additional IP Address on a Linux Server"}]},{"@type":"WebSite","@id":"https:\/\/www.simplyhosting.com\/support\/#website","url":"https:\/\/www.simplyhosting.com\/support\/","name":"Support Centre - Simply Hosting &amp; Servers","description":"Simply Hosting &amp; Servers Support Centre","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.simplyhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":2,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/434\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/434\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-category?post=434"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}